Create Record API
POST /domains/:domain_name/records
Create a new DNS record for a domain.
Path Parameters
| Name | Type | Description | 
|---|---|---|
domain_name | 
string | Domain name (e.g. example.com) | 
Request Body (application/json)
{
  "name": "www",
  "record_type": "A",
  "content": "192.0.2.1",
  "ttl": "3600"
}
Authentication
Requires Bearer token or API key in query string.
Example Request
curl -X POST "https://dnsprivacy.org.uk/domains/example.com/records" \
  -H "Authorization: Bearer <your-access-token>" \
  -H "content-type: application/json" \
  -d '{
    "name": "www",
    "record_type": "A",
    "content": "192.0.2.1",
    "ttl": "3600"
  }'
Response (200 OK)
{
  "id": 1,
  "name": "www",
  "record_type": "A",
  "content": "192.0.2.1",
  "ttl": "3600",
  "fqdn": "www.example.com"
}
Response Schema
| Field | Type | Description | 
|---|---|---|
id | 
integer | Unique identifier for the record | 
name | 
string | Name/label for the DNS record | 
record_type | 
string | DNS record type (e.g., A, AAAA, TXT) | 
content | 
string | Value or target of the record | 
ttl | 
string | Time to live (in seconds) | 
fqdn | 
string | Fully qualified domain name |