Sidebar

Create Domain API

POST /domains

Creates a new authoritative domain.

Request Body (application/json)

An object containing the name of the domain to create. Each domain must include at least a name.

Example

{
  "name": "example.com"
}

Authentication

This endpoint requires authentication via Bearer token or API key in query string.


Example Request

curl -X POST "https://dnsprivacy.org.uk/domains" \
  -H 'accept: application/json' \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <your-access-token>'
  -d '{
    "name": "example.com"
  }'

Response (200 OK)

Returns an object representation of the domain that was successfully created.

[
  {
    "name": "example.com",
    "delegated": false,
    "created_at": "1970-01-01T00:00:00.000Z",
    "updated_at": "1970-01-01T00:00:00.000Z",
    "serial_number": 2025043001,
    "refresh_interval": 3600,
    "retry_interval": 600,
    "expire_interval": 604800,
    "minimum_ttl": 300,
    "dnssec_enabled": false
  }
]

Response Schema

Field Type Description
name string Domain name
delegated boolean Whether the domain is delegated
created_at date-time When the domain was created
updated_at date-time When the domain was last updated
serial_number integer SOA serial number
refresh_interval integer SOA refresh value (seconds)
retry_interval integer SOA retry value (seconds)
expire_interval integer SOA expire value (seconds)
minimum_ttl integer SOA minimum TTL (seconds)
dnssec_enabled boolean Whether DNSSEC is enabled

Our use of cookies
We use a session cookie to maintain your login state when you create an account with us. This cookie is essential for the operation of our website and is used solely for authentication purposes. For more information, please read our privacy policy.