[C] Consentify

Developer API

Authenticated REST API for managing sites, categories, and consent events.

All /api/v1/* endpoints require an API key via the x-api-key header. API keys are managed in the dashboard and use the ck_ prefix.

Sites

List Sites

GET /api/v1/sites

Returns all sites belonging to the authenticated user.

Create Site

POST /api/v1/sites
{
  "name": "My Website",
  "domain": "example.com",
  "config": {}
}

Automatically seeds three default categories: Necessary, Analytics, Marketing.

Get Site

GET /api/v1/sites/:siteId

Returns site details and consent categories:

{
  "site": { "id": "...", "name": "...", "domain": "...", "status": "active", "config": {} },
  "categories": [...]
}

Update Site

PATCH /api/v1/sites/:siteId
{
  "name": "Updated Name",
  "domain": "new-domain.com",
  "config": {},
  "status": "active"
}

All fields are optional. At least one must be provided.

Delete Site (Soft)

DELETE /api/v1/sites/:siteId

Sets site status to deleted.


Categories

List Categories

GET /api/v1/sites/:siteId/categories

Returns categories ordered by sortOrder.

Create Category

POST /api/v1/sites/:siteId/categories
{
  "key": "preferences",
  "nameEn": "Preferences",
  "descriptionEn": "Remember your settings and preferences.",
  "isRequired": false,
  "isDefault": true
}

Key must match pattern /^[a-z0-9_]{1,50}$/ and be unique within the site.

Update Category

PATCH /api/v1/sites/:siteId/categories/:categoryId
{
  "nameEn": "Updated Name",
  "descriptionEn": "Updated description.",
  "isDefault": false
}

Delete Category

DELETE /api/v1/sites/:siteId/categories/:categoryId

Fails if the category is marked as required.

Reorder Categories

PUT /api/v1/sites/:siteId/categories/reorder
{
  "order": [
    { "id": "cat-1", "sortOrder": 0 },
    { "id": "cat-2", "sortOrder": 1 },
    { "id": "cat-3", "sortOrder": 2 }
  ]
}

GET /api/v1/consent/events/:siteId?limit=50&offset=0
ParameterTypeDefaultDescription
limitnumber50Results per page
offsetnumber0Pagination offset
POST /api/v1/consent/events

Same body as the widget events endpoint, but requires API key auth and site ownership verification.

On this page