This section provides detailed documentation for all API endpoints.
Manage projects and their associated resources programmatically.
| Endpoint | Method | Description |
|---|---|---|
/api/v1/machine/project | GET | List all projects |
/api/v1/machine/project | POST | Create a new project |
/api/v1/machine/project/:id | GET | Get project details |
Access and manage vault items and secrets programmatically.
| Endpoint | Method | Description |
|---|---|---|
/api/v1/machine/vault/env/:projectId | GET | Get project environment variables |
/api/v1/machine/vault/:vaultId/items | POST | Create a vault item |
Manage DNS records for domains purchased through R4.
| Endpoint | Method | Description |
|---|---|---|
/api/v1/machine/domain-manager/dns-records | GET | Get DNS records for a domain |
All successful responses return JSON with a 2xx status code. The response body structure varies by endpoint.
All errors follow a consistent format:
{
"error": {
"code": "error_code",
"message": "Human-readable error message"
}
}Common error codes:
| Code | HTTP Status | Description |
|---|---|---|
unauthorized | 401 | Invalid or missing API key |
missing_api_key | 401 | No API key provided in the request |
invalid_api_key | 401 | The provided API key is invalid |
project_not_found | 404 | The requested project was not found |
domain_not_found | 404 | The requested domain was not found |
domain_not_managed | 403 | The domain is not managed through R4 |
Currently, endpoints return all results in a single response. Future endpoints may support pagination with the following format:
{
"data": [...],
"pagination": {
"page": 1,
"limit": 50,
"total": 150,
"totalPages": 3
}
}Query parameters for paginated endpoints:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | number | 1 | Page number (1-indexed) |
limit | number | 50 | Number of items per page (max 100) |
GET /vault/env/:projectId endpoint for project environment variablesPOST /vault/:vaultId/items endpoint for creating vault itemsGET /project endpoint for listing all projectsPOST /project endpoint for creating projectsGET /project/:id endpoint for project detailsGET /domain-manager/dns-records endpoint