Skip to main content

Developer API

Build .af domains into your platform

A simple REST API for resellers. Check availability, get your prices and read your domains and balance — from your own website or billing system.

API access is included with reseller accounts once it’s enabled for you.

curl -X POST https://www.domain.af/api/v1/domains/check \
  -H "X-DomainAf-Key: daf_…" \
  -H "X-DomainAf-Secret: …" \
  -H "Content-Type: application/json" \
  -d '{"domain":"example.af"}'

{
  "success": true,
  "data": {
    "domain": "example.af",
    "available": true,
    "pricing": { "amount": "28.50", "currency": "USD" }
  }
}

Endpoints

What you can do with the API

All endpoints return JSON. Registering, renewing and transferring domains is done in the reseller portal.

  • Domain Registration

    Register, renew and transfer domains, paid from your account credit at your reseller prices. Idempotent.

    POST /api/v1/domains/register

  • Domain Management

    Nameservers, contacts, registrar lock, EPP codes, child nameservers, WHOIS Privacy and Domain Protection.

    PUT /api/v1/domains/{domain}/nameservers

  • Domain Availability

    Check whether a domain is available and receive reseller-effective pricing in the same response.

    POST /api/v1/domains/check

  • Pricing

    Retrieve reseller-effective quotes for registration, renewal, transfer, or restore.

    POST /api/v1/pricing

  • Domain List

    List domains associated with your reseller account.

    GET /api/v1/domains

  • Domain Information

    Retrieve status, expiry, and nameservers for a domain you manage.

    GET /api/v1/domains/{domain}

  • Account Balance

    Retrieve your reseller credit balance, currency, and active domain count.

    GET /api/v1/account/balance

  • Pricing Tier

    See your current tier, next tier, and domains needed to advance.

    GET /api/v1/account/tier

Quick start

Your first API call in three steps

  1. Open a reseller account

    Sign up, verify your email and turn on two-factor authentication.

  2. Create an API key

    Once API access is enabled, generate a key and secret in the portal. The secret is shown only once.

  3. Make a request

    Send your key and secret as headers from your server — never from a browser or mobile app.

Security

Keep your API keys safe

Treat your API secret like a password. You stay in control of every key.

  • REST JSON API under /api/v1/
  • HMAC-SHA256 signed requests with replay protection (timestamp + single-use nonce)
  • Idempotency-Key on every billable request: retries never charge twice
  • Per-key permissions (scopes)
  • Optional IP allowlists per credential (addresses and CIDR ranges)
  • Per-credential rate limiting (default 60 requests/minute)
  • Structured error objects with machine-readable codes
  • Rotate or revoke a key instantly if it’s ever exposed

FAQ

Developer questions

Access, credentials and what the API supports today.

Still have a question? Contact support

Who can use the Domain.af API?

API access is available to reseller accounts with API enabled. Create a reseller account, complete security setup, then enable API access and generate credentials in the portal.

Can I call the API from a browser app?

No. Never expose API credentials in client-side or browser applications. Call the API only from secure server-side systems.

Does Domain.af provide official SDKs?

Domain.af provides an official WHMCS registrar module. For other systems, use the REST examples in the documentation with your preferred HTTP client.

Is there a sandbox environment?

A dedicated sandbox is not available yet. Use your reseller account carefully and prefer availability/pricing endpoints while integrating.