API Documentation

Complete API reference for integrating with Unregistrar services.

Authentication

All API requests require authentication via Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_TOKEN

Domain Search

POST /api/domains/search

Search for available domains and subdomains.

Request Body:

{
  "query": "example",
  "tlds": ["com.store", "com.shop", "com.blog"]
}

Response:

{
  "success": true,
  "data": {
    "results": [
      {
        "domain": "example.com.store",
        "available": true,
        "price": 9.99,
        "premium": false
      }
    ]
  }
}

Cart Management

GET /api/cart/view

View current cart contents.

POST /api/cart/add

Add domain to cart.

Request Body:

{
  "domain": "example.com.store",
  "years": 1
}
DELETE /api/cart/remove

Remove domain from cart.

Domain Management

GET /api/domains/list

List all domains in your account.

GET /api/domains/dns/get-records

Get DNS records for a domain.

PUT /api/domains/dns/update-record

Update DNS records.

Authentication

POST /api/auth/login

Login to get API token.

Request Body:

{
  "email": "[email protected]",
  "password": "your_password"
}
POST /api/auth/register

Create new account.

POST /api/auth/logout

Logout and invalidate token.

Rate Limits

API requests are limited to:

Error Codes

CodeDescription
200Success
400Bad Request
401Unauthorized
403Forbidden
404Not Found
429Too Many Requests
500Internal Server Error