Skip to content

PocketDNS Partner API ​

Welcome to the PocketDNS Partner API documentation. This interactive documentation allows you to explore all endpoints, test API calls, and understand the complete API structure.

Quick Start ​

Get started with the PocketDNS Partner API in minutes:

  1. Get API Key: Obtain your API key from the Partner Dashboard
  2. Choose Environment: Use sandbox for testing, production for live applications
  3. Authenticate: Use Bearer token authentication with your API key
  4. Start Building: Begin with user session creation, then manage domains and DNS records

Authentication ​

All API requests require authentication using Bearer tokens:

http
Authorization: Bearer YOUR_API_KEY_HERE

To test endpoints in this documentation:

  1. Click "Try it out" on any endpoint
  2. Enter your API key in the authorization field
  3. Configure parameters and execute the request

Environments ​

EnvironmentBase URLDescription
Sandboxhttps://api.sandbox.pocketdns.comFor testing and development
Productionhttps://api.pocketdns.comFor live applications

API Operations ​

User Management ​

Manage user sessions and authentication flows.


Domain Management ​

Retrieve domain information and listings for users.


DNS Records ​

Complete CRUD operations for DNS record management.

Create DNS Record ​

Get DNS Record ​

Update DNS Record ​

Delete DNS Record ​


Data Models & Schemas ​

Servers​

https://api.pocketdns.com
https://api.sandbox.pocketdns.com

Find or create user and initialize a new session for them​

POST
/api/v1/users

Authorizations​

bearerAuth
TypeHTTP (bearer)

Request Body​

application/json
JSON
{
"user_identifier": "string",
"email": "string"
}

Responses​

User session initialized

application/json
JSON
{
"user_identifier": "string",
"login_url": "string"
}

Playground​

Server
Authorization
Body

Samples​


Retrieve a list of domains for a given user​

GET
/api/v1/users/{user_id}/domains

Parameters​

Path Parameters

user_id*
Typestring
Required

Responses​

List of domains for the user

application/json
JSON
{
"domains": [
{
"id": "string",
"name": "string"
}
]
}

Playground​

Server
Variables
Key
Value

Samples​


Retrieve details of a specific domain​

GET
/api/v1/domains/{domain_id}

Parameters​

Path Parameters

domain_id*
Typestring
Required

Responses​

Domain details

application/json
JSON
{
"id": "string",
"name": "string"
}

Playground​

Server
Variables
Key
Value

Samples​


Create a DNS record​

POST
/api/v1/dns_records

Authorizations​

bearerAuth
TypeHTTP (bearer)

Request Body​

application/json
JSON
{
"domain_id": "string",
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"weight": 0,
"port": 0,
"target": "string"
}

Responses​

DNS record created successfully

application/json
JSON
{
"id": "string",
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"weight": 0,
"port": 0,
"target": "string"
}

Playground​

Server
Authorization
Body

Samples​


Retrieve a specific DNS record​

GET
/api/v1/dns_records/{id}

Authorizations​

bearerAuth
TypeHTTP (bearer)

Parameters​

Path Parameters

id*
Typestring
Required

Responses​

DNS record details

application/json
JSON
{
"id": "string",
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"weight": 0,
"port": 0,
"target": "string"
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Delete a DNS record​

DELETE
/api/v1/dns_records/{id}

Authorizations​

bearerAuth
TypeHTTP (bearer)

Parameters​

Path Parameters

id*
Typestring
Required

Responses​

DNS record deleted successfully

Playground​

Server
Authorization
Variables
Key
Value

Samples​


Update a DNS record​

PATCH
/api/v1/dns_records/{id}

Authorizations​

bearerAuth
TypeHTTP (bearer)

Parameters​

Path Parameters

id*
Typestring
Required

Request Body​

application/json
JSON
{
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"weight": 0,
"port": 0,
"target": "string"
}

Responses​

DNS record updated successfully

application/json
JSON
{
"id": "string",
"type": "string",
"name": "string",
"value": "string",
"ttl": 0,
"priority": 0,
"weight": 0,
"port": 0,
"target": "string"
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​


Powered by VitePress OpenAPI

Code Examples ​

Create User Session ​

javascript
const response = await fetch('https://api.pocketdns.com/api/v1/users', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    user_identifier: 'user123',
    email: '[email protected]'
  })
});

const session = await response.json();
console.log('Login URL:', session.login_url);

Create DNS Record ​

javascript
const record = await fetch('https://api.pocketdns.com/api/v1/dns_records', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    domain_id: 'domain123',
    type: 'A',
    name: 'www',
    value: '192.168.1.1',
    ttl: 300
  })
});

SDK Generation ​

Generate client libraries for your preferred programming language:

TypeScript/JavaScript ​

bash
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g typescript-fetch \
  -o ./pocketdns-sdk

Python ​

bash
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g python \
  -o ./pocketdns-sdk-python

Go ​

bash
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g go \
  -o ./pocketdns-sdk-go

View all supported languages →

Development Tools ​

Postman Collection ​

Import our API directly into Postman:

  1. Open Postman
  2. Click Import → Link
  3. Enter: https://docs.pocketdns.com/partner-api.yml
  4. Postman auto-generates a complete collection

Rate Limiting ​

Monitor your API usage with response headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per time window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when rate limit resets

Error Handling ​

All errors follow a consistent format:

json
{
  "errors": [
    "Domain not found",
    "Invalid DNS record type"
  ]
}

Common HTTP status codes:

  • 400 - Bad Request: Invalid parameters
  • 401 - Unauthorized: Missing or invalid API key
  • 404 - Not Found: Resource doesn't exist
  • 422 - Unprocessable Entity: Validation errors

Support & Resources ​

Built with ❤️ for PocketDNS Partners