API Overview

The DNSX Cloud REST API allows you to programmatically manage DNS records, zones, and bulk operations across your Cloudflare accounts.

Base URL
https://dnsx.cotlas.net/api/v1
Format
JSON (application/json)
Version
v1 (stable)

Authentication

All API requests must be authenticated with a Bearer token. Generate tokens from Settings → API Tokens.

Include the token in the Authorization header:

Authorization: Bearer dnsx_your_token_here
Content-Type: application/json
Keep your tokens secret. Never expose them in client-side code or public repositories. Tokens are stored hashed and cannot be recovered — generate a new one if lost.

Error Codes

The API uses standard HTTP status codes. Error responses are JSON with a message field.

StatusMeaning
200Success
201Record created
400Bad request — invalid parameters
401Unauthorized — missing or invalid token
403Forbidden — insufficient plan or permissions
404Resource not found
422Validation error
429Rate limit exceeded
500Internal server error
// Error response example
{
  "error": true,
  "message": "DNS record not found",
  "code": 404
}

Rate Limits

API requests are rate limited per token. Headers on every response include your current limits:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 987
X-RateLimit-Reset: 1735689600
PlanRequests / minuteRequests / day
Pro6010,000
Business12050,000
Enterprise300Unlimited

DNS Records

GET /api/v1/dns-records List all DNS records

Returns paginated DNS records for the authenticated user's active organization.

Query Parameters

ParameterTypeDescription
zone_idstringFilter by Cloudflare zone ID
typestringFilter by record type (A, AAAA, CNAME, MX, TXT, …)
namestringSearch by record name
pageintegerPage number (default: 1)
per_pageintegerRecords per page (default: 50, max: 200)

Example Request

curl -X GET "https://dnsx.cotlas.net/api/v1/dns-records?type=A&page=1" \
  -H "Authorization: Bearer dnsx_your_token_here"

Example Response

{
  "data": [
    {
      "id": "abc123",
      "zone_id": "zone_xyz",
      "zone_name": "example.com",
      "type": "A",
      "name": "example.com",
      "content": "1.2.3.4",
      "ttl": 1,
      "proxied": true,
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": { "page": 1, "per_page": 50, "total": 124 }
}
POST /api/v1/dns-records Create a DNS record

Request Body

FieldTypeRequiredDescription
zone_idstringRequiredCloudflare zone ID
typestringRequiredA, AAAA, CNAME, MX, TXT, NS, SRV, CAA
namestringRequiredDNS record name (e.g. @, www)
contentstringRequiredRecord value (IP, hostname, etc.)
ttlintegerOptionalTTL in seconds; 1 = auto (default)
proxiedbooleanOptionalProxy via Cloudflare (A/AAAA/CNAME only)
priorityintegerOptionalPriority for MX/SRV records

Example Request

curl -X POST "https://dnsx.cotlas.net/api/v1/dns-records" \
  -H "Authorization: Bearer dnsx_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"zone_id":"zone_xyz","type":"A","name":"www","content":"1.2.3.4","proxied":true}'

Response

// 201 Created
{ "id": "new_record_id", "type": "A", "name": "www.example.com", "content": "1.2.3.4" }
PUT /api/v1/dns-records/{id} Update a DNS record

Update an existing DNS record. Same fields as POST, all optional (only include what you want to change).

curl -X PUT "https://dnsx.cotlas.net/api/v1/dns-records/abc123" \
  -H "Authorization: Bearer dnsx_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"content":"5.6.7.8"}'
DELETE /api/v1/dns-records/{id} Delete a DNS record
curl -X DELETE "https://dnsx.cotlas.net/api/v1/dns-records/abc123" \
  -H "Authorization: Bearer dnsx_your_token_here"
// 204 No Content (success)

Zones

GET /api/v1/zones List all zones

Returns all Cloudflare zones synced in the active organization.

curl "https://dnsx.cotlas.net/api/v1/zones" \
  -H "Authorization: Bearer dnsx_your_token_here"
{
  "data": [
    { "id": "zone_xyz", "name": "example.com", "status": "active", "records_count": 12 }
  ]
}
POST /api/v1/zones/sync Trigger zone sync from Cloudflare

Re-fetches all zones from Cloudflare for the given account. Returns a job ID you can poll.

curl -X POST "https://dnsx.cotlas.net/api/v1/zones/sync" \
  -H "Authorization: Bearer dnsx_your_token_here" \
  -d '{"cf_account_id": 1}'

Bulk Operations

POST /api/v1/bulk/update Bulk update DNS records across zones

Request Body

FieldTypeRequiredDescription
zone_idsarrayRequiredList of Cloudflare zone IDs to update
record_typestringRequiredDNS record type (A, AAAA, CNAME, etc.)
record_namestringRequiredRecord name to target (e.g. @)
new_contentstringRequiredNew value to set
dry_runbooleanOptionalSimulate without making changes (default: false)
curl -X POST "https://dnsx.cotlas.net/api/v1/bulk/update" \
  -H "Authorization: Bearer dnsx_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "zone_ids": ["zone_abc", "zone_def"],
    "record_type": "A",
    "record_name": "@",
    "new_content": "5.6.7.8"
  }'
// 200 OK
{
  "job_id": "bulk_job_789",
  "zones_queued": 2,
  "status": "processing"
}

Organizations

GET /api/v1/organizations List organizations you belong to
curl "https://dnsx.cotlas.net/api/v1/organizations" \
  -H "Authorization: Bearer dnsx_your_token_here"
{
  "data": [
    { "id": 1, "name": "Acme Ltd", "role": "owner", "plan": "Business" }
  ]
}

DNSX Cloud API v1  ·  View plans  ·  Manage tokens