application/json and is versioned under /v1.
The full machine-readable spec is available at /api-reference/openapi.json and is rendered at API reference.
Base URL
CUSTODY_ENV=production to enforce HTTPS for tenant URLs and webhook endpoints. Development environments may use HTTP.
Resource families
Authentication
All non-public endpoints require authentication. Two modes are supported.API key
POST /v1/credentials and scoped to a tenant. Rotate with POST /v1/credentials/rotate.
SSO (OIDC)
Enabled withCUSTODY_SSO_ENABLED=true. Exchange your IdP token for a Qustody access token at POST /v1/auth/login, then send it in the Authorization: Bearer header. Refresh with POST /v1/auth/refresh.
Idempotency
Every mutating endpoint accepts anIdempotency-Key header. Duplicate requests with the same key within 24 hours return the original response without re-executing.
Pagination
List endpoints use cursor-based pagination:has_more is false, next_cursor is null. limit defaults to 50 and may not exceed 200.
Filtering and sorting
Common query parameters:Rate limits
Default rate limit is 120 requests per minute per API key with a burst of 20. Configurable viaCUSTODY_RATE_LIMIT_RPM and CUSTODY_RATE_LIMIT_BURST.
When exceeded, the API returns 429 Too Many Requests with Retry-After header.
CUSTODY_RATE_LIMIT_REDIS_URL so limits are enforced cluster-wide.
Standard response shape
Successful single-resource responses return the resource directly:Error envelope
All errors return:Standard headers
Versioning
The API is versioned in the URL path (/v1). Breaking changes ship as /v2 with a deprecation period announced in the changelog. Additive changes (new fields, new endpoints) are released within /v1.