Skip to content

Base URL

All API requests are made to:

https://contox.dev/api

Every endpoint path documented in this reference is relative to this base URL. For example, the projects endpoint is accessible at https://contox.dev/api/projects.

Request format

The Contox API follows standard REST conventions:

  • Content-Type: All request bodies must be sent as application/json
  • Accept: All responses are returned as application/json
  • Methods: Standard HTTP methods (GET, POST, PATCH, DELETE) are used throughout

Response structure

Success responses

Successful responses return the appropriate HTTP status code (200, 201, 202) with a JSON body containing the requested data.

json
{
  "id": "proj_abc123",
  "name": "My Project",
  "createdAt": "2025-01-15T10:30:00Z"
}

List endpoints return arrays:

json
[
  { "id": "proj_abc123", "name": "Project A" },
  { "id": "proj_def456", "name": "Project B" }
]

Error responses

All errors follow a consistent format:

json
{
  "error": "A human-readable error message describing what went wrong"
}

Common HTTP status codes:

StatusMeaning
400Bad Request -- invalid parameters or body
401Unauthorized -- missing or invalid authentication
403Forbidden -- insufficient permissions
404Not Found -- resource does not exist
409Conflict -- resource already exists or state conflict
429Too Many Requests -- rate limit exceeded
500Internal Server Error -- something went wrong on our end

Security headers

Every response includes the following security headers:

HeaderValue
X-Content-Type-Optionsnosniff
X-Frame-OptionsDENY
Referrer-Policystrict-origin-when-cross-origin
Strict-Transport-Securitymax-age=31536000; includeSubDomains

CORS

Cross-Origin Resource Sharing is configured for the following origins:

  • https://contox.dev
  • https://www.contox.dev
  • https://app.contox.dev

Requests from other origins will be rejected by the browser.

Versioning

The V2 endpoints (under /api/v2/) represent the latest version of the API with enhanced capabilities including HMAC authentication, event-driven ingestion, and AI-powered enrichment. The V1 endpoints remain available and functional.

Next steps