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:
- 100 requests per minute for authenticated users
- 20 requests per minute for unauthenticated users
- Search endpoint: 30 requests per minute
Error Codes
Code | Description |
---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
429 | Too Many Requests |
500 | Internal Server Error |