Getting Started with the API
The {{COMPANY_NAME}} API allows you to programmatically manage your hosting services, domains, DNS records, and account settings. This guide provides an overview of the API, how to authenticate, and how to make your first request.
API Overview
Our RESTful API enables you to:
- Domain management: Register, renew, transfer, and configure domains
- DNS management: Create, update, and delete DNS records
- Hosting management: Provision, manage, and monitor hosting services
- Account management: Update profile information, view invoices, manage contacts
- Order management: Place new orders, check order status, view order history
Base URL
All API requests are made to:
https://api.{{COMPANY_NAME}}.com/v1All requests must use HTTPS. HTTP requests will be rejected.
Authentication
The API uses Bearer token authentication. Include your API token in the Authorization header of every request:
Authorization: Bearer YOUR_API_TOKENTo generate an API token:
- Log in to your {{COMPANY_NAME}} client portal
- Navigate to Account Settings > API Access
- Click Generate New Token
- Give your token a descriptive name (e.g., "Production App", "Dev Testing")
- Copy and securely store the token — it will only be displayed once
Tip: Treat your API token like a password. Never expose it in client-side code, public repositories, or logs. See our API Authentication Guide for security best practices.
Making Your First Request
Check Your Account Profile
A simple GET request to verify your authentication:
curl -X GET https://api.{{COMPANY_NAME}}.com/v1/account/profile \\
-H "Authorization: Bearer YOUR_API_TOKEN" \\
-H "Content-Type: application/json"Example Response
{
"status": "success",
"data": {
"id": "cust_abc123",
"name": "John Doe",
"email": "[email protected]",
"company": "Example Corp"
}
}Request Format
Headers
All requests must include:
Authorization: Bearer YOUR_API_TOKENContent-Type: application/json(for POST/PUT/PATCH requests)
HTTP Methods
| Method | Usage |
|---|---|
| GET | Retrieve resources |
| POST | Create new resources |
| PUT | Replace a resource entirely |
| PATCH | Partially update a resource |
| DELETE | Remove a resource |
Response Format
All responses are JSON and follow this structure:
Success Response
{
"status": "success",
"data": { ... }
}Error Response
{
"status": "error",
"error": {
"code": "INVALID_PARAMETER",
"message": "The domain name is invalid"
}
}Common HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Resource created |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (invalid or missing token) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Rate Limits
To ensure fair usage, the API enforces rate limits:
- Standard: 60 requests per minute
- Burst: Up to 10 requests per second
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 55
X-RateLimit-Reset: 1679900000If you exceed the rate limit, you will receive a 429 status code. Wait until the reset time before making more requests.
Pagination
List endpoints return paginated results:
GET /v1/domains?page=1&limit=25Pagination metadata is included in the response:
{
"status": "success",
"data": [...],
"pagination": {
"page": 1,
"limit": 25,
"total": 150,
"totalPages": 6
}
}Next Steps
- API Authentication Guide — detailed token management and security
- Explore the full API documentation in your client portal under API Access
- Test endpoints using tools like curl, Postman, or Insomnia
Related Articles
Need help with the API? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.