partners

Embed
Preview of the card
<a href="https://lucidace.com/docs/ref-partners"><img src="https://lucidace.com/docs/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/da916cd3-c0fc-4b63-b971-b3c13623daf3/pages/2aa77c41-85c6-4473-be5d-19d5610df492/social-card.svg?v=3e7ae33eec8b" alt="partners" width="600" height="315"></a>
POSThttps://lucidace.com/v1/partners/cookiemunch/events/{external_id}

Called by Cookie Munch (Lucida is the registered partner, Cookie Munch the sender), never by a browser or an API key. external_id is the Lucida PROJECT id named in the grant. Authentication is the CookieMunch-Partner-Signature: t=<unix>,kid=<kid>,ed25519=<base64url sig of '<t>.<raw body>'> header, verified against https://api.cookiemunch.net/v1/partner/jwks.json; t must be within 5 minutes. A bad or stale signature answers 401. Without the partner token configured the route answers 404 feature-not-enabled. consent.recorded and consent.withdrawn map data.choices (statistics; a category in data.withdrawn[] reads false) to the $consent_analytics and $consent_replay person properties of the subject, matched like privacy/lookup (subject.sub/ext against $cm_subject_id, then distinct ids, then subject.email only with email_verified). consent.updated with data.categories is still read. Every delivery records its cbid in the project's linked sites. Answers {ok: true, updated: n}, {ignored: true, reason: "no_subject"} when no person matches, or {ok: true, skipped: <type>} for other types (subscription.changed).

Parameters

external_idstringpathrequired
The Lucida project id

Request body

application/json

A Cookie Munch delivery (consent.recorded, consent.withdrawn); other types are acknowledged and skipped.

dataobject
{cbid, choices, region, stamp} (consent.withdrawn adds withdrawn[]): choices holds booleans keyed necessary, preferences, statistics, marketing; statistics sets $consent_analytics and $consent_replay.
subjectobject
Who consented (present when signed in): sub / ext (matched against $cm_subject_id, then distinct ids), email, email_verified.
typestringrequired
consent.recorded, consent.withdrawn or subscription.changed (skipped); event is accepted as an alias.
{
  "data": {},
  "subject": {},
  "type": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/partners/cookiemunch/events/{external_id}" \
  -H "Content-Type: application/json" \
  -d '{"data":{},"subject":{},"type":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 taken, or {ignored: true, reason}
Example
{
  "ignored": true,
  "ok": true,
  "reason": "string",
  "skipped": "string",
  "updated": 0
}
Schema
ignoredboolean
okboolean
reasonstring
no_subject, no_categories, no_cbid or site_not_registered.
skippedstring
The event type that was not acted on.
updatedinteger
Persons the consent decision was written to.
401 bad or stale signature
404 partner link not enabled on this deployment
503 the Cookie Munch key set is unavailable; retry
POSThttps://lucidace.com/v1/partners/cookiemunch/executor-key/{external_id}

Called by Cookie Munch (Lucida is the registered partner, Cookie Munch the sender), never by a browser or an API key. external_id is the Lucida PROJECT id named in the grant. Authentication is the CookieMunch-Partner-Signature: t=<unix>,kid=<kid>,ed25519=<base64url sig of '<t>.<raw body>'> header, verified against https://api.cookiemunch.net/v1/partner/jwks.json; t must be within 5 minutes. A bad or stale signature answers 401. Without the partner token configured the route answers 404 feature-not-enabled. The nonce is never accepted twice (409), and the link is confirmed live with GET /v1/partner/links (403 no_live_link otherwise). Mints a project secret key holding only privacy:execute, revoking the previous one, and answers {secret: "lc_sk_...", executorUrl: "https://<host>/v1/projects/<project_id>"}.

Parameters

external_idstringpathrequired
The Lucida project id

Request body

application/json
cbidstringrequired
The Cookie Munch site link id (at most 64 characters); confirmed with GET /v1/partner/links.
externalIdstring
Must equal the route's project id when present.
iatinteger
Unix seconds; rejected when more than 5 minutes off.
noncestringrequired
At most 128 characters; a nonce is accepted once.
orgIdstring
partnerstring
{
  "cbid": "string",
  "externalId": "string",
  "iat": 0,
  "nonce": "string",
  "orgId": "string",
  "partner": "string"
}

Code samples

cURL
curl -X POST "https://lucidace.com/v1/partners/cookiemunch/executor-key/{external_id}" \
  -H "Content-Type: application/json" \
  -d '{"cbid":"string","externalId":"string","iat":0,"nonce":"string","orgId":"string","partner":"string"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 {secret, executorUrl}
Example
{
  "executorUrl": "string",
  "secret": "string"
}
Schema
executorUrlstringrequired
https://<host>/v1/projects/<project_id>: the executor base URL.
secretstringrequired
A project secret key (lc_sk_...) holding only privacy:execute; shown once.
400
401 bad or stale signature
403 no live link
404 not configured or unknown project
409 nonce already used
502
503
Updated