API Endpoints

Full reference for every c15t consent backend endpoint.

All endpoints are relative to your configured basePath (e.g. /api/c15t).

Info

The backend auto-generates interactive API docs at {basePath}/docs using your OpenAPI spec. Visit this URL in a browser to explore endpoints with a visual UI.

GET /init

Returns the initial consent state for a client. This is the first call made by the frontend SDKs.

Response:

FieldDescription
jurisdictionDetected regulation (GDPR, UK_GDPR, CCPA, etc.)
locationGeo-location from IP address
translationsServer-side translations based on Accept-Language
brandingBranding configuration
gvlGlobal Vendor List (if IAB TCF is enabled)

GET /status

Health check endpoint. Returns server version and client info.

Response:

POST /subjects

Records a consent event. This is an append-only operation — every call creates a new consent record.

Request:

FieldTypeRequiredDescription
typestringYescookie_banner, privacy_policy, dpa, terms_and_conditions, marketing_communications, age_verification, other
subjectIdstringYesClient-generated subject identifier
domainstringYesDomain where consent was given
preferencesobjectNoConsent category preferences (for cookie_banner type)
givenAtnumberYesEpoch timestamp
policyIdstringNoAssociated policy ID
metadataobjectNoArbitrary metadata
externalSubjectIdstringNoExternal user ID for cross-device linking
identityProviderstringNoIdentity provider name

Response:

GET /subjects/:id

Retrieves consent status for a subject.

Query Parameters:

ParameterDescription
typeComma-separated consent types to filter (e.g. cookie_banner,privacy_policy)

Response:

PATCH /subjects/:id

Links a subject to an external user ID for cross-device consent resolution.

Request:

Response:

GET /consents/check

Check consent status by external ID — useful for cross-device consent resolution.

Query Parameters:

ParameterDescription
externalIdThe external user ID to look up
typeComma-separated consent types

Response:

GET /subjects (Authenticated)

List subjects by external ID. Requires an API key.

Headers:

Query Parameters:

ParameterDescription
externalIdThe external user ID to search

Response:

Info

This endpoint requires API key authentication. Configure API keys in the apiKeys option. The key is passed via the Authorization: Bearer header using timing-safe comparison.

GET /spec.json

Returns the OpenAPI 3.1 specification for the consent API.

GET /docs

Serves the interactive API documentation UI (Scalar).