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:
- Get API Key: Obtain your API key from the Partner Dashboard
- Choose Environment: Use sandbox for testing, production for live applications
- Authenticate: Use Bearer token authentication with your API key
- Start Building: Begin with user session creation, then manage domains and DNS records
Authentication 
All API requests require authentication using Bearer tokens:
Authorization: Bearer YOUR_API_KEY_HERETo test endpoints in this documentation:
- Click "Try it out" on any endpoint
- Enter your API key in the authorization field
- Configure parameters and execute the request
Environments 
| Environment | Base URL | Description | 
|---|---|---|
| Sandbox | https://api.sandbox.pocketdns.com | For testing and development | 
| Production | https://api.pocketdns.com | For 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
Find or create user and initialize a new session for them
Retrieve a list of domains for a given user
Retrieve details of a specific domain
Create a DNS record
Authorizations
Request Body
Responses
DNS record created successfully
Retrieve a specific DNS record
Authorizations
Parameters
Path Parameters
Responses
DNS record details
Delete a DNS record
Update a DNS record
Authorizations
Parameters
Path Parameters
Request Body
Responses
DNS record updated successfully
Code Examples 
Create User Session 
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 
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 
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g typescript-fetch \
  -o ./pocketdns-sdkPython 
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g python \
  -o ./pocketdns-sdk-pythonGo 
npx @openapitools/openapi-generator-cli generate \
  -i https://docs.pocketdns.com/partner-api.yml \
  -g go \
  -o ./pocketdns-sdk-goView all supported languages →
Development Tools 
Postman Collection 
Import our API directly into Postman:
- Open Postman
- Click Import → Link
- Enter: https://docs.pocketdns.com/partner-api.yml
- Postman auto-generates a complete collection
Rate Limiting 
Monitor your API usage with response headers:
| Header | Description | 
|---|---|
| X-RateLimit-Limit | Maximum requests per time window | 
| X-RateLimit-Remaining | Requests remaining in current window | 
| X-RateLimit-Reset | Unix timestamp when rate limit resets | 
Error Handling 
All errors follow a consistent format:
{
  "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 
- 📚 Integration Guide - Step-by-step setup
- 🔧 Best Practices - Optimization tips
- 💬 Contact Support - Get help
- 📊 Status Page - Service status
