API Overview
The DNSX Cloud REST API allows you to programmatically manage DNS records, zones, and bulk operations across your Cloudflare accounts.
https://dnsx.cotlas.net/api/v1
JSON (application/json)
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
Error Codes
The API uses standard HTTP status codes. Error responses are JSON with a message field.
| Status | Meaning |
|---|---|
200 | Success |
201 | Record created |
400 | Bad request — invalid parameters |
401 | Unauthorized — missing or invalid token |
403 | Forbidden — insufficient plan or permissions |
404 | Resource not found |
422 | Validation error |
429 | Rate limit exceeded |
500 | Internal 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
| Plan | Requests / minute | Requests / day |
|---|---|---|
| Pro | 60 | 10,000 |
| Business | 120 | 50,000 |
| Enterprise | 300 | Unlimited |
DNS Records
Returns paginated DNS records for the authenticated user's active organization.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
zone_id | string | Filter by Cloudflare zone ID |
type | string | Filter by record type (A, AAAA, CNAME, MX, TXT, …) |
name | string | Search by record name |
page | integer | Page number (default: 1) |
per_page | integer | Records 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 }
}
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
zone_id | string | Required | Cloudflare zone ID |
type | string | Required | A, AAAA, CNAME, MX, TXT, NS, SRV, CAA |
name | string | Required | DNS record name (e.g. @, www) |
content | string | Required | Record value (IP, hostname, etc.) |
ttl | integer | Optional | TTL in seconds; 1 = auto (default) |
proxied | boolean | Optional | Proxy via Cloudflare (A/AAAA/CNAME only) |
priority | integer | Optional | Priority 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" }
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"}'
curl -X DELETE "https://dnsx.cotlas.net/api/v1/dns-records/abc123" \ -H "Authorization: Bearer dnsx_your_token_here"
// 204 No Content (success)
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 }
]
}
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
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
zone_ids | array | Required | List of Cloudflare zone IDs to update |
record_type | string | Required | DNS record type (A, AAAA, CNAME, etc.) |
record_name | string | Required | Record name to target (e.g. @) |
new_content | string | Required | New value to set |
dry_run | boolean | Optional | Simulate 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
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