R4

API Reference

This section provides detailed documentation for all API endpoints.

Project Endpoints

Manage projects and their associated resources programmatically.

EndpointMethodDescription
/api/v1/machine/projectGETList all projects
/api/v1/machine/projectPOSTCreate a new project
/api/v1/machine/project/:idGETGet project details

Vault Endpoints

Access and manage vault items and secrets programmatically.

EndpointMethodDescription
/api/v1/machine/vault/env/:projectIdGETGet project environment variables
/api/v1/machine/vault/:vaultId/itemsPOSTCreate a vault item

Domain Manager Endpoints

Manage DNS records for domains purchased through R4.

EndpointMethodDescription
/api/v1/machine/domain-manager/dns-recordsGETGet DNS records for a domain

Common Response Formats

Success Responses

All successful responses return JSON with a 2xx status code. The response body structure varies by endpoint.

Error Responses

All errors follow a consistent format:

{
  "error": {
    "code": "error_code",
    "message": "Human-readable error message"
  }
}

Common error codes:

CodeHTTP StatusDescription
unauthorized401Invalid or missing API key
missing_api_key401No API key provided in the request
invalid_api_key401The provided API key is invalid
project_not_found404The requested project was not found
domain_not_found404The requested domain was not found
domain_not_managed403The domain is not managed through R4

Pagination

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:

ParameterTypeDefaultDescription
pagenumber1Page number (1-indexed)
limitnumber50Number of items per page (max 100)

Changelog

v1.3.0 (February 2026)

  • Added GET /vault/env/:projectId endpoint for project environment variables
  • Added POST /vault/:vaultId/items endpoint for creating vault items

v1.2.0 (January 2026)

  • Added GET /project endpoint for listing all projects
  • Added POST /project endpoint for creating projects

v1.1.0 (January 2026)

  • Added GET /project/:id endpoint for project details

v1.0.0 (January 2026)

  • Initial release
  • Added GET /domain-manager/dns-records endpoint