VPS.org API

REST API ದಸ್ತಾವೇಜೀಕರಣ

DNS Management API

ನಿಮ್ಮ ಡೊಮೇನ್‌ಗಳಿಗಾಗಿ DNS ವಲಯಗಳು ಮತ್ತು ದಾಖಲೆಗಳನ್ನು ಪ್ರೋಗ್ರಾಮ್ಯಾಟಿಕ್ ಆಗಿ ನಿರ್ವಹಿಸಿ.

ಅಂತ್ಯಬಿಂದುಗಳು 7 endpoints
ಬೇಸ್ ಪಾತ್ /api/v1/dns-zones
Authentication Bearer Token Required

Overview

The DNS API provides full management of DNS zones and records. All zones are hosted on VPS.org's authoritative nameservers with automatic BIND9 zone file generation and deployment.

Nameserver Infrastructure

Key Features

Authentication

All DNS API requests require Bearer token authentication. Generate API tokens from your account dashboard at /account/developers/ with the following permissions:

Example

Authorization: Bearer vps_abc123def456...
Important: API tokens are shown only once during creation. Store them securely. If you lose a token, you must generate a new one.
ಪಡೆಯಿರಿ /api/v1/dns-zones/

ಎಲ್ಲಾ DNS ವಲಯಗಳನ್ನು ಪಟ್ಟಿ ಮಾಡಿ

Retrieve a paginated list of all DNS zones owned by the authenticated user. Supports filtering by domain name.

ಪ್ರಶ್ನೆ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
domain string ಇಲ್ಲ Filter zones by exact domain name (e.g., example.com)

ಉದಾಹರಣೆ ವಿನಂತಿ

cURL
Python
JavaScript
curl -X GET "https://admin.vps.org/api/v1/dns-zones/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
import requests

url = "https://admin.vps.org/api/v1/dns-zones/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/dns-zones/', {
  headers: {'Authorization': 'Bearer YOUR_API_TOKEN'}
});

const zones = await response.json();
console.log(zones);

ಉದಾಹರಣೆ ಪ್ರತಿಕ್ರಿಯೆ

[
  {
    "uuid": "abc123-def456-ghi789",
    "domain": "example.com",
    "created_at": "2024-01-15T10:30:00Z",
    "record_count": 12
  },
  {
    "uuid": "xyz789-uvw456-rst123",
    "domain": "myapp.io",
    "created_at": "2024-06-20T14:15:00Z",
    "record_count": 8
  }
]

Response Fields

Field ಪ್ರಕಾರ ವಿವರಣೆ
uuid string Unique zone identifier (used in API requests)
domain string Domain name for this DNS zone
created_at datetime Zone creation timestamp (ISO 8601 format)
record_count integer Total number of DNS records in this zone

ಪ್ರತಿಕ್ರಿಯೆ ಸ್ಥಿತಿ ಕೋಡ್‌ಗಳು

200 Successfully retrieved DNS zones list
401 Unauthorized - Invalid or missing API token
403 Forbidden - Token lacks dns:list permission
ಪಡೆಯಿರಿ /api/v1/dns-zones/{uuid}/

Get DNS Zone Details

Retrieve detailed information about a specific DNS zone, including all records.

ಮಾರ್ಗ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
uuid string ಹೌದು Unique zone identifier

ಉದಾಹರಣೆ ಪ್ರತಿಕ್ರಿಯೆ

{
  "uuid": "abc123-def456-ghi789",
  "domain": "example.com",
  "created_at": "2024-01-15T10:30:00Z",
  "record_count": 5,
  "records": [
    {
      "uuid": "rec-001",
      "record_type": "A",
      "name": "@",
      "value": "192.0.2.1",
      "ttl": 3600,
      "priority": null,
      "created_at": "2024-01-15T10:30:00Z"
    },
    {
      "uuid": "rec-002",
      "record_type": "MX",
      "name": "@",
      "value": "mail.example.com",
      "ttl": 3600,
      "priority": 10,
      "created_at": "2024-01-15T10:32:00Z"
    }
  ]
}

ಪ್ರತಿಕ್ರಿಯೆ ಸ್ಥಿತಿ ಕೋಡ್‌ಗಳು

200 Successfully retrieved zone details
404 Zone not found or not owned by user
ಪೋಸ್ಟ್ /api/v1/dns-zones/

Create DNS Zone

Create a new DNS zone for a domain. The zone will be immediately deployed to VPS.org nameservers.

ವಿನಂತಿಯ ಮುಖ್ಯ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
domain string ಹೌದು Domain name (e.g., example.com)

ಉದಾಹರಣೆ ವಿನಂತಿ

cURL
Python
JavaScript
curl -X POST "https://admin.vps.org/api/v1/dns-zones/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "newdomain.com"}'
import requests

url = "https://admin.vps.org/api/v1/dns-zones/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {"domain": "newdomain.com"}

response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch('https://admin.vps.org/api/v1/dns-zones/', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({domain: 'newdomain.com'})
});

const zone = await response.json();
console.log(zone);

ಉದಾಹರಣೆ ಪ್ರತಿಕ್ರಿಯೆ

{
  "uuid": "new-zone-uuid",
  "domain": "newdomain.com",
  "created_at": "2026-01-18T16:45:00Z",
  "record_count": 0,
  "records": []
}

ಪ್ರತಿಕ್ರಿಯೆ ಸ್ಥಿತಿ ಕೋಡ್‌ಗಳು

201 DNS zone created successfully
400 Bad Request - Invalid domain name or zone already exists
403 Forbidden - Token lacks dns:create permission
ಅಳಿಸಿ /api/v1/dns-zones/{uuid}/

Delete DNS Zone

Permanently delete a DNS zone and all associated records. This action cannot be undone.

ಮಾರ್ಗ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
uuid string ಹೌದು Unique zone identifier

ಪ್ರತಿಕ್ರಿಯೆ ಸ್ಥಿತಿ ಕೋಡ್‌ಗಳು

204 Zone deleted successfully (no response body)
403 Forbidden - Token lacks dns:delete permission
404 Zone not found
ಪಡೆಯಿರಿ /api/v1/dns-zones/{uuid}/records/

List DNS Records in Zone

Retrieve all DNS records for a specific zone (nested route).

ಮಾರ್ಗ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
uuid string ಹೌದು Zone UUID

ಉದಾಹರಣೆ ವಿನಂತಿ

curl -X GET "https://admin.vps.org/api/v1/dns-zones/{uuid}/records/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

ಉದಾಹರಣೆ ಪ್ರತಿಕ್ರಿಯೆ

[
  {
    "uuid": "rec-001",
    "record_type": "A",
    "name": "@",
    "value": "192.0.2.1",
    "ttl": 3600,
    "priority": null,
    "created_at": "2024-01-15T10:30:00Z"
  },
  {
    "uuid": "rec-002",
    "record_type": "MX",
    "name": "@",
    "value": "mail.example.com",
    "ttl": 3600,
    "priority": 10,
    "created_at": "2024-01-15T10:32:00Z"
  }
]
ಪೋಸ್ಟ್ /api/v1/dns-zones/{uuid}/records/

Create DNS Record in Zone

Add a new DNS record to a specific zone (nested route).

ವಿನಂತಿಯ ಮುಖ್ಯ ನಿಯತಾಂಕಗಳು

ಪ್ಯಾರಾಮೀಟರ್ ಪ್ರಕಾರ ಅಗತ್ಯವಿದೆ ವಿವರಣೆ
record_type string ಹೌದು Record type: A, AAAA, CNAME, MX, TXT, NS, SRV, CAA
name string ಹೌದು Record name (@ for root, subdomain, or FQDN)
value string ಹೌದು Record value (IP address, hostname, text)
ttl integer No Time to live in seconds (default: 3600)
priority integer For MX/SRV Priority (required for MX and SRV records)

ಉದಾಹರಣೆ ವಿನಂತಿ

cURL
Python
curl -X POST "https://admin.vps.org/api/v1/dns-zones/{uuid}/records/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "record_type": "A",
    "name": "www",
    "value": "192.0.2.1",
    "ttl": 3600
  }'
import requests

url = f"https://admin.vps.org/api/v1/dns-zones/{zone_uuid}/records/"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "record_type": "A",
    "name": "www",
    "value": "192.0.2.1",
    "ttl": 3600
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

ಪ್ರತಿಕ್ರಿಯೆ ಸ್ಥಿತಿ ಕೋಡ್‌ಗಳು

201 DNS record created successfully
400 Bad Request - Invalid parameters or validation error (e.g., MX record missing priority)
GET PUT PATCH DELETE /api/v1/dns-records/{uuid}/

Manage DNS Records (Direct Access)

Full CRUD operations on individual DNS records using record UUID.

Available Operations

Query Parameters (for GET /api/v1/dns-records/)

Parameter ಪ್ರಕಾರ ವಿವರಣೆ
zone string Filter records by zone UUID
record_type string Filter by record type (A, AAAA, MX, etc.)

Example: Update TTL of a Record

curl -X PATCH "https://admin.vps.org/api/v1/dns-records/{rec-uuid}/" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ttl": 1800}'

Supported DNS Record Types

ಪ್ರಕಾರ Purpose Example Value Priority Required
A Maps domain to IPv4 address 192.0.2.1 ಇಲ್ಲ
AAAA Maps domain to IPv6 address 2001:0db8::1 ಇಲ್ಲ
CNAME Creates alias to another domain example.com ಇಲ್ಲ
MX Mail server for domain mail.example.com ಹೌದು
TXT Text record (SPF, DKIM, verification) v=spf1 include:_spf.google.com ~all ಇಲ್ಲ
NS Nameserver delegation ns1.example.com ಇಲ್ಲ
SRV Service location record 10 5060 sip.example.com ಹೌದು
CAA Certificate authority authorization 0 issue "letsencrypt.org" ಇಲ್ಲ

Best Practices

TTL Configuration

Common Patterns

Security

Error Handling

Common Errors

Status Code Error Solution
400 Invalid domain name Ensure domain follows DNS naming conventions
400 MX record requires priority Include priority field for MX and SRV records
401 Invalid API token Check token format (must start with vps_)
403 Missing permission Generate new token with required dns:* permissions
404 Zone/record not found Verify UUID and ensure resource belongs to your account

Example Error Response

{
  "detail": "MX records require a priority value",
  "error_code": "validation_error",
  "field": "priority"
}

Testing DNS Changes

Verify Record Propagation

# Query A record
dig example.com A

# Query specific nameserver
dig @ns1.vps.org example.com

# Query MX records
dig example.com MX

# Check all records
dig example.com ANY

Using Online Tools