{"openapi":"3.0.0","paths":{"/v1/scan-requests":{"get":{"operationId":"V1CookiesController_scanRequests","parameters":[],"responses":{"200":{"description":"Pending scan requests, oldest first (at most 10).","content":{"application/json":{"schema":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Pass as `runId` to POST /v1/cookie-scans to fulfil it."},"url":{"type":["string","null"]},"environment":{"type":"string","enum":["TEST","LIVE"]},"trigger":{"type":"string","enum":["SCHEDULED","ON_DEMAND","IMPORT"]},"maxPages":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Page cap asked for with the request (1 = just `url`); null = crawl with your default."},"requestedAt":{"type":"string","format":"date-time"}},"required":["id","url","environment","trigger","maxPages","requestedAt"]},"description":"Oldest first, at most 10."}},"required":["requests"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Pending on-demand scan requests queued from the console, for this key’s site + environment. Poll, crawl each URL, then POST /v1/cookie-scans with its runId.","tags":["cookies"],"x-croombit-scope":"scans:write"}},"/v1/cookie-scans":{"post":{"operationId":"V1CookiesController_submit","parameters":[],"responses":{"201":{"description":"The scan run and a site-wide classification summary.","content":{"application/json":{"schema":{"type":"object","properties":{"run":{"type":"object","properties":{"id":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"trigger":{"type":"string","enum":["SCHEDULED","ON_DEMAND","IMPORT"]},"url":{"type":["string","null"]},"pagesCrawled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"consentAccepted":{"description":"Whether the crawl found and accepted a consent banner; null when the submission did not report it.","type":["boolean","null"]},"requestIssues":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string"},"issue":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["host","issue","count"]},"description":"Request trouble the crawl saw, by host (a blocked host, an HTTP error from a consent API…); empty when none was reported."},"cookiesFound":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"newUnclassified":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Observations of this scan the cascade could not confidently place."},"startedAt":{"type":"string","format":"date-time"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"required":["id","siteId","environment","trigger","url","pagesCrawled","consentAccepted","requestIssues","cookiesFound","newUnclassified","startedAt","finishedAt","cancelledAt"]},"byClassifier":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Site-wide cookie count per classifier: DB, HEURISTIC, AI, HUMAN, or NONE (unclassified)."},"byCategory":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Site-wide cookie count per category."},"reviewQueue":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string"},"party":{"type":"string","enum":["FIRST","THIRD"]},"guess":{"anyOf":[{"type":"object","properties":{"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","UNCLASSIFIED"]},"classifiedBy":{"type":"string","enum":["DB","HEURISTIC","AI","HUMAN"]},"confidence":{"type":"number","description":"0–1."},"rationale":{"type":["string","null"]}},"required":["category","classifiedBy","confidence","rationale"]},{"type":"null"}],"description":"The current best guess; null when nothing has classified the cookie yet."}},"required":["id","name","domain","party","guess"]},"description":"Site-wide cookies still awaiting human review."}},"required":["run","byClassifier","byCategory","reviewQueue"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Submit observed cookies from the headless crawler worker. Authenticated with the site sk_ key.","tags":["cookies"],"x-croombit-scope":"scans:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"runId":{"type":"string","minLength":1},"cookies":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1},"party":{"type":"string","enum":["FIRST","THIRD"]},"path":{"type":"string"},"expirySeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storageType":{"type":"string","enum":["COOKIE","LOCAL_STORAGE","SESSION_STORAGE","INDEXEDDB"]},"setByVendorDomain":{"type":["string","null"]},"seenBeforeConsent":{"description":"True when it was present before any consent was given.","type":"boolean"}},"required":["name","domain","party"]}},"pagesCrawled":{"description":"Pages the crawl visited.","type":"integer","minimum":1,"maximum":100000},"consentAccepted":{"description":"Whether the crawl found and accepted a consent banner.","type":"boolean"},"requestIssues":{"description":"Request trouble seen during the crawl, by host — e.g. a blocked host or an HTTP error from a consent API.","maxItems":50,"type":"array","items":{"type":"object","properties":{"host":{"type":"string","minLength":1,"maxLength":255},"issue":{"type":"string","minLength":1,"maxLength":80},"count":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["host","issue","count"]}},"thirdPartyRequestDomains":{"description":"Third-party domains the crawled pages loaded from — evidence for which vendors are actually present.","maxItems":300,"type":"array","items":{"type":"string","minLength":1,"maxLength":255}}},"required":["cookies"]}}}}}},"/v1/blocklist":{"get":{"operationId":"V1CookiesController_blocklist","parameters":[],"responses":{"200":{"description":"Tracking domains with the consent category each requires.","content":{"application/json":{"schema":{"type":"object","properties":{"updatedAt":{"type":"string","format":"date-time","description":"When the reference database last changed; the Unix epoch when it is empty."},"entries":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"category":{"type":"string","enum":["FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION"],"description":"The consent category a request to this domain needs."}},"required":["domain","category"]}}},"required":["updatedAt","entries"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Known third-party tracking domains for automatic prior-blocking, derived from the shared cookie reference database (the same one cookie scanning classifies against). Platform-wide, not site-scoped — grows as that database grows, independent of the CMP bundle.","tags":["cookies"]}},"/v1/cookies":{"get":{"operationId":"V1CookiesController_list","parameters":[],"responses":{"200":{"description":"The classified cookie inventory of this site.","content":{"application/json":{"schema":{"type":"object","properties":{"lastScanAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the last completed scan finished; null if the site was never scanned."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cookies":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string"},"party":{"type":"string","enum":["FIRST","THIRD"]},"expirySeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"storageType":{"type":"string","enum":["COOKIE","LOCAL_STORAGE","SESSION_STORAGE","INDEXEDDB"]},"lastSeenAt":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","UNCLASSIFIED"],"description":"UNCLASSIFIED until the cascade or a reviewer places it."},"vendor":{"type":["string","null"]},"purpose":{"description":"Human-readable purpose of the cookie.","type":["string","null"]},"classifiedBy":{"anyOf":[{"type":"string","enum":["DB","HEURISTIC","AI","HUMAN"]},{"type":"null"}],"description":"How the category was reached; null while unclassified."}},"required":["name","domain","party","expirySeconds","storageType","lastSeenAt","category","vendor","purpose","classifiedBy"]}}},"required":["lastScanAt","count","cookies"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The site classified cookie inventory — for the banner’s per-purpose table and the auto-updating cookie-declaration widget. Includes the last completed scan date.","tags":["cookies"]}},"/v1/consent":{"post":{"operationId":"V1ConsentController_record","parameters":[{"name":"Idempotency-Key","in":"header","description":"Retry-safe key; scoped per site + environment.","required":false,"schema":{"type":"string"}},{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The new append-only consent record and its signed receipt id.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new (append-only) consent record."},"subjectId":{"type":"string","description":"The subject the record belongs to (after merge resolution)."},"subjectCreated":{"type":"boolean","description":"True when this call created the subject."},"purpose":{"type":"string","description":"Purpose key."},"state":{"type":"string","enum":["GRANTED","DENIED","WITHDRAWN"]},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Version of the purpose statement that was published when this was recorded."},"source":{"type":"string","enum":["API","IMPORT","MIGRATION"],"description":"How the record entered the vault. API = the subject acted (banner, preference center, your app); IMPORT / MIGRATION = you (the controller) asserted it with no subject action."},"collectedAt":{"type":"string","format":"date-time","description":"When the decision was collected (the request `collectedAt`, else now)."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Per-record expiry, if one was sent."},"receiptId":{"type":"string","description":"Signed receipt for this record — fetch it from GET /v1/receipts/{id}."}},"required":["id","subjectId","subjectCreated","purpose","state","purposeVersion","source","collectedAt","expiresAt","receiptId"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Record a consent decision (GRANTED / DENIED / WITHDRAWN) for a subject + purpose.","tags":["consent"],"x-croombit-scope":"consent:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"purpose":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"state":{"type":"string","enum":["GRANTED","DENIED","WITHDRAWN"]},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"channel":{"type":"string","maxLength":60},"locale":{"type":"string","pattern":"^[a-z]{2}(?:-[A-Z]{2})?$"},"country":{"type":"string","minLength":2,"maxLength":2},"pageUrl":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"source":{"type":"string","enum":["API","IMPORT","MIGRATION"]},"ip":{"description":"End user's IP address. sk_ keys only — defaults to the caller's.","anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"}]},"userAgent":{"description":"End user's User-Agent. sk_ keys only — defaults to the caller's.","type":"string","maxLength":512}},"required":["subject","purpose","state"]}}}}}},"/v1/consent/batch":{"post":{"operationId":"V1ConsentController_recordBatch","parameters":[{"name":"Idempotency-Key","in":"header","description":"Retry-safe key; scoped per site + environment.","required":false,"schema":{"type":"string"}},{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The records written, plus one receipt id per subject.","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of records written."},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the new (append-only) consent record."},"subjectId":{"type":"string","description":"The subject the record belongs to (after merge resolution)."},"subjectCreated":{"type":"boolean","description":"True when this call created the subject."},"purpose":{"type":"string","description":"Purpose key."},"state":{"type":"string","enum":["GRANTED","DENIED","WITHDRAWN"]},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Version of the purpose statement that was published when this was recorded."},"source":{"type":"string","enum":["API","IMPORT","MIGRATION"],"description":"How the record entered the vault. API = the subject acted (banner, preference center, your app); IMPORT / MIGRATION = you (the controller) asserted it with no subject action."}},"required":["id","subjectId","subjectCreated","purpose","state","purposeVersion","source"]}},"receipts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"One receipt per subject in the batch, keyed by subjectId, covering all of that subject’s records."}},"required":["recorded","records","receipts"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Record up to 100 consent decisions in one call.","tags":["consent"],"x-croombit-scope":"consent:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"state":{"type":"string","enum":["GRANTED","DENIED","WITHDRAWN"]},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"channel":{"type":"string","maxLength":60},"locale":{"type":"string","pattern":"^[a-z]{2}(?:-[A-Z]{2})?$"},"country":{"type":"string","minLength":2,"maxLength":2},"pageUrl":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"source":{"type":"string","enum":["API","IMPORT","MIGRATION"]},"ip":{"description":"End user's IP address. sk_ keys only — defaults to the caller's.","anyOf":[{"type":"string","format":"ipv4"},{"type":"string","format":"ipv6"}]},"userAgent":{"description":"End user's User-Agent. sk_ keys only — defaults to the caller's.","type":"string","maxLength":512},"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]}},"required":["purpose","state","subject"]}}},"required":["records"]}}}}}},"/v1/preferences":{"post":{"operationId":"V1ConsentController_recordPreferences","parameters":[{"name":"Idempotency-Key","in":"header","description":"Retry-safe key; scoped per site + environment.","required":false,"schema":{"type":"string"}},{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The field keys that were written.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"subjectCreated":{"type":"boolean","description":"True when this call created the subject."},"templateVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Version of the published preference center the values were recorded against."},"updated":{"type":"array","items":{"type":"string"},"description":"Field keys that were written."}},"required":["subjectId","subjectCreated","templateVersion","updated"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Record one or more preference-center values for a subject.","tags":["consent","preferences"],"x-croombit-scope":"consent:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"values":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"value":{}},"required":["field","value"]}},"channel":{"type":"string","maxLength":60},"pageUrl":{"type":"string","maxLength":2000,"format":"uri"}},"required":["subject","values"]}}}}}},"/v1/preferences/confirmation-token":{"post":{"description":"Writes the pending value(s) and mints a single-use confirmation token; the live preference is unchanged until the click. **Server-only:** the token is the whole capability, so a publishable (pk_) key gets 403. By default, put the token/confirmUrl in your own confirmation email (\"model 1\") — the way to send it in your own (or your customer's) branding. Set `to` to have Croombit send the email itself via its own ESP (\"model 2\" — requires Resend to be configured; falls back to model 1 if not): it is headed by the site's name, sent as \"<site name> via Croombit\", and written in `locale` (en, es, de, fr, it, nl, pt; default: the site's default locale). `to` must be the subject's own EMAIL identifier (at most 3 emails per recipient per hour), and `redirectUrl` must be http(s) on one of the site's domains or a subdomain of one — it is re-checked when the link is clicked.","operationId":"V1ConsentController_requestPreferenceConfirmation","parameters":[{"name":"Idempotency-Key","in":"header","description":"Retry-safe key; scoped per site + environment.","required":false,"schema":{"type":"string"}},{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The pending fields and the single-use confirmation token (shown once).","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"subjectCreated":{"type":"boolean"},"confirmationId":{"type":"string"},"token":{"type":"string","description":"Single-use confirmation token. Shown once — it is the whole capability, keep it server-side."},"confirmUrl":{"type":"string","description":"Link that confirms the opt-in when clicked (or GET-requested); put it in your confirmation email."},"expiresAt":{"type":"string","format":"date-time","description":"When the token stops working (`ttlSeconds`, default 7 days)."},"templateVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pending":{"type":"array","items":{"type":"string"},"description":"Field keys written as PENDING; the live preference is unchanged until confirmed."}},"required":["subjectId","subjectCreated","confirmationId","token","confirmUrl","expiresAt","templateVersion","pending"]}}}},"403":{"description":"`forbidden` — called with a publishable (pk_) key."},"422":{"description":"`validation_failed` (e.g. a non-http(s) redirectUrl), `redirect_not_allowed` or `recipient_mismatch`."},"429":{"description":"`rate_limited` — too many confirmation emails to this recipient.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"security":[{"bearer":[]}],"summary":"Start a double opt-in — write pending value(s), mint a confirmation token. Secret key (sk_) only.","tags":["consent","preferences"],"x-croombit-scope":"consent:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"values":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"value":{}},"required":["field","value"]}},"channel":{"type":"string","maxLength":60},"pageUrl":{"type":"string","maxLength":2000,"format":"uri"},"redirectUrl":{"type":"string","maxLength":2000,"format":"uri"},"ttlSeconds":{"type":"integer","minimum":300,"maximum":2592000},"to":{"type":"string","format":"email"},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Za-z]{2})?$"}},"required":["subject","values"]}}}}}},"/v1/preferences/confirm":{"post":{"operationId":"V1PreferenceConfirmController_confirm","parameters":[],"responses":{"201":{"description":"The outcome of the confirmation. Always a body, never an error, so a stale link is still answerable.","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","const":"confirmed"},"subjectId":{"type":"string"},"fields":{"type":"array","items":{"type":"string"},"description":"Field keys now live."},"redirectUrl":{"description":"The integrator’s redirect target, re-checked against the site’s domains at click time; null if none/no longer allowed.","type":["string","null"]},"alreadyConfirmed":{"type":"boolean","description":"True when this token had already been confirmed (the call is idempotent)."}},"required":["status","subjectId","fields","redirectUrl","alreadyConfirmed"]},{"type":"object","properties":{"status":{"type":"string","enum":["expired","cancelled","invalid"]},"redirectUrl":{"type":["string","null"]}},"required":["status","redirectUrl"]}]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"Confirm a double opt-in with its token (backend-to-backend). Idempotent. Returns { status: confirmed | expired | cancelled | invalid }.","tags":["preferences"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":400}},"required":["token"]}}}}}},"/v1/subjects":{"post":{"operationId":"V1SubjectsController_create","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The subject id; `created` is false when an existing subject matched.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"created":{"type":"boolean","description":"False when an existing subject matched one of the identifiers."}},"required":["subjectId","created"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Create (or return the existing) subject for a set of identifiers.","tags":["subjects"],"x-croombit-scope":"subjects:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}}}}}},"/v1/subjects/merge":{"post":{"description":"If the source is named only by a device or cookie id and that device already belongs to a different identified subject, the two people are not merged: only the device is re-linked to the target (`outcome: device_relinked`).","operationId":"V1SubjectsController_merge","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}}],"responses":{"201":{"description":"The surviving subject and how much moved.","content":{"application/json":{"schema":{"type":"object","properties":{"sourceSubjectId":{"type":"string","description":"The subject that was merged away (now redirects to the target)."},"targetSubjectId":{"type":"string","description":"The surviving subject."},"movedIdentifiers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Identifiers re-pointed to the target (colliding ones are dropped)."},"movedRecords":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Vault records (consent + preference) re-pointed to the target."},"outcome":{"type":"string","enum":["merged","device_relinked"],"description":"`merged`: the source was folded into the target. `device_relinked`: the source was a device/cookie id already owned by a different identified subject, so only that device moved to the target — both subjects and their records stay separate."}},"required":["sourceSubjectId","targetSubjectId","movedIdentifiers","movedRecords","outcome"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Merge one subject into another (anonymous → identified). Vault records move.","tags":["subjects"],"x-croombit-scope":"subjects:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"target":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"reason":{"type":"string","maxLength":500}},"required":["source","target"]}}}}}},"/v1/subjects/{ref}/identifiers":{"post":{"operationId":"V1SubjectsController_addIdentifier","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":"The updated subject view.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"mergedIntoId":{"description":"Set when this subject was merged into another.","type":["string","null"]},"erasedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when the subject was crypto-shredded."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"identifiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"isPrimary":{"type":"boolean"},"shreddedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when the identifier value was crypto-shredded (erasure)."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","isPrimary","shreddedAt","createdAt"]},"description":"Identifier types only — values are never returned."},"currentConsent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"purposeId":{"type":"string"},"purposeKey":{"type":"string"},"state":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED","WITHDRAWN","EXPIRED"]},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastRecordId":{"type":"string","description":"The vault record this projection row reflects."},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","subjectId","siteId","environment","purposeId","purposeKey","state","purposeVersion","collectedAt","expiresAt","lastRecordId","updatedAt"]},"description":"The consent projection (latest record per purpose). Purposes never decided are absent — use GET /v1/subjects/{ref}/consent for defaults."},"currentPreference":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"fieldKey":{"type":"string"},"value":{"description":"The preference value (boolean, string, number or array, per the field type)."},"collectedAt":{"type":"string","format":"date-time"},"lastRecordId":{"type":"string"},"pendingConfirmationId":{"description":"Set while a double opt-in for this field awaits confirmation; `value` is unchanged until then.","type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","subjectId","siteId","environment","fieldKey","value","collectedAt","lastRecordId","pendingConfirmationId","updatedAt"]}}},"required":["id","siteId","environment","mergedIntoId","erasedAt","createdAt","updatedAt","identifiers","currentConsent","currentPreference"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Attach an identifier (email, phone, external_id…) to a subject.","tags":["subjects"],"x-croombit-scope":"subjects:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}}}}},"/v1/subjects/{ref}":{"get":{"operationId":"V1SubjectsController_get","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The subject with its identifier types and current consent / preference projections.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"mergedIntoId":{"description":"Set when this subject was merged into another.","type":["string","null"]},"erasedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when the subject was crypto-shredded."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"identifiers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"isPrimary":{"type":"boolean"},"shreddedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Set when the identifier value was crypto-shredded (erasure)."},"createdAt":{"type":"string","format":"date-time"}},"required":["id","type","isPrimary","shreddedAt","createdAt"]},"description":"Identifier types only — values are never returned."},"currentConsent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"purposeId":{"type":"string"},"purposeKey":{"type":"string"},"state":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED","WITHDRAWN","EXPIRED"]},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"lastRecordId":{"type":"string","description":"The vault record this projection row reflects."},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","subjectId","siteId","environment","purposeId","purposeKey","state","purposeVersion","collectedAt","expiresAt","lastRecordId","updatedAt"]},"description":"The consent projection (latest record per purpose). Purposes never decided are absent — use GET /v1/subjects/{ref}/consent for defaults."},"currentPreference":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"subjectId":{"type":"string"},"siteId":{"type":"string"},"environment":{"type":"string","enum":["TEST","LIVE"]},"fieldKey":{"type":"string"},"value":{"description":"The preference value (boolean, string, number or array, per the field type)."},"collectedAt":{"type":"string","format":"date-time"},"lastRecordId":{"type":"string"},"pendingConfirmationId":{"description":"Set while a double opt-in for this field awaits confirmation; `value` is unchanged until then.","type":["string","null"]},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","subjectId","siteId","environment","fieldKey","value","collectedAt","lastRecordId","pendingConfirmationId","updatedAt"]}}},"required":["id","siteId","environment","mergedIntoId","erasedAt","createdAt","updatedAt","identifiers","currentConsent","currentPreference"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Subject view: identifier types (not values), current consent, current preferences.","tags":["subjects"],"x-croombit-scope":"subjects:read"}},"/v1/subjects/{ref}/consent":{"get":{"operationId":"V1SubjectsController_getConsent","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}},{"name":"purpose","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Consent state per published purpose, defaults included.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"purposes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"object","properties":{"state":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED"],"description":"The purpose’s default state (no decision recorded yet)."},"source":{"type":"string","const":"default","description":"Present only when the subject has no record for this purpose."},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Currently published purpose version."},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]}},"required":["state","source","purposeVersion","legalBasis"]},{"type":"object","properties":{"state":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED","WITHDRAWN","EXPIRED"],"description":"EXPIRED is derived at read time when `expiresAt` has passed."},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Version of the statement the subject decided on."},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"needsReconsent":{"type":"boolean","description":"True when the consent expired, or a RECONSENT_REQUIRED purpose version has been published since the subject decided."},"latestPurposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Currently published purpose version."},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"recordedVia":{"anyOf":[{"type":"string","enum":["API","IMPORT","MIGRATION","CONSOLE"]},{"type":"null"}],"description":"How the latest record entered. How the record entered the vault. API = the subject acted (banner, preference center, your app); IMPORT / MIGRATION = you (the controller) asserted it with no subject action."}},"required":["state","purposeVersion","collectedAt","expiresAt","needsReconsent","latestPurposeVersion","legalBasis","recordedVia"]}]},"description":"Keyed by purpose key; every published purpose appears. Entries with `source: \"default\"` have no decision yet."}},"required":["subjectId","purposes"]}}}},"404":{"description":"`purpose_not_found` — `purpose` names no published purpose (unknown, draft-only or archived)."},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Current consent state for a subject across all published purposes.","tags":["subjects"],"x-croombit-scope":"subjects:read"}},"/v1/subjects/{ref}/consent/history":{"get":{"description":"Every consent record, newest first (max 500), with `source` (API = the subject acted; IMPORT / MIGRATION = the controller asserted it), your `metadata`, `proof` and the `supersedesId` chain, plus the `legalBasis` of each purpose. Server-side only (`sk_`).","operationId":"V1SubjectsController_getHistory","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}},{"name":"purpose","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Every consent record, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"legalBasis":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"description":"Legal basis of each purpose appearing in `records`, keyed by purpose key."},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"purposeKey":{"type":"string"},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED","WITHDRAWN","EXPIRED"]},"collectedAt":{"type":"string","format":"date-time"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"source":{"type":"string","enum":["API","IMPORT","MIGRATION","CONSOLE"],"description":"How the record entered the vault. API = the subject acted (banner, preference center, your app); IMPORT / MIGRATION = you (the controller) asserted it with no subject action."},"channel":{"type":["string","null"]},"locale":{"type":["string","null"]},"pageUrl":{"type":["string","null"]},"proof":{"anyOf":[{"type":"object","properties":{"statementHash":{"description":"SHA-256 of the exact statement text the subject saw.","type":"string"},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},{"type":"null"}],"description":"Proof of what was shown when the decision was made."},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}],"description":"The free-form `metadata` you sent with the write."},"supersedesId":{"description":"The earlier record this one replaced (append-only chain).","type":["string","null"]}},"required":["id","purposeKey","purposeVersion","state","collectedAt","expiresAt","source","channel","locale","pageUrl","proof","metadata","supersedesId"]},"description":"Newest first, max 500."}},"required":["subjectId","count","legalBasis","records"]}}}},"404":{"description":"`purpose_not_found` — `purpose` names no purpose on this site (archived ones keep their history)."},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Full append-only consent history for a subject.","tags":["subjects"],"x-croombit-scope":"subjects:read"}},"/v1/subjects/{ref}/preferences/history":{"get":{"description":"Every preference write, newest first (max 500), including pending double opt-in request legs (`confirmationState`). Server-side only (`sk_`): call it from your backend, e.g. to show a logged-in user their own history.","operationId":"V1SubjectsController_getPreferenceHistory","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}},{"name":"field","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Every preference write, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fieldKey":{"type":"string"},"value":{},"templateVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"collectedAt":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["API","IMPORT","MIGRATION","CONSOLE"],"description":"How the record entered the vault. API = the subject acted (banner, preference center, your app); IMPORT / MIGRATION = you (the controller) asserted it with no subject action."},"channel":{"type":["string","null"]},"pageUrl":{"type":["string","null"]},"confirmationState":{"anyOf":[{"type":"string","enum":["PENDING","CONFIRMED","EXPIRED","CANCELLED"]},{"type":"null"}],"description":"Double opt-in leg: PENDING = request leg (not live), CONFIRMED = confirm leg. Null on the classic single opt-in path."},"proof":{"anyOf":[{"type":"object","properties":{"doubleOptIn":{"type":["boolean","null"]},"confirmationId":{"type":["string","null"]},"requestedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"method":{"type":["string","null"]}},"required":["doubleOptIn","confirmationId","requestedAt","method"]},{"type":"null"}],"description":"Non-personal double opt-in evidence; IPs and user agents stay in the vault."},"supersedesId":{"type":["string","null"]}},"required":["id","fieldKey","value","templateVersion","collectedAt","source","channel","pageUrl","confirmationState","proof","supersedesId"]},"description":"Newest first, max 500. Includes pending double opt-in request legs."}},"required":["subjectId","count","records"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Full append-only preference history for a subject.","tags":["subjects"],"x-croombit-scope":"subjects:read"}},"/v1/subjects/{ref}/preferences":{"get":{"operationId":"V1SubjectsController_getPreferences","parameters":[{"name":"X-Tc-Identity","in":"header","description":"Identity token — required with a pk_ key when the subject is identified (email:, phone:, external_id:, custom:).","required":false,"schema":{"type":"string"}},{"name":"ref","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Live values plus any pending double opt-in requests.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"preferences":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"value":{},"collectedAt":{"type":"string","format":"date-time"}},"required":["value","collectedAt"]},"description":"Live values keyed by field key. A pending double opt-in does not change these until confirmed."},"pendingConfirmations":{"type":"array","items":{"type":"object","properties":{"confirmationId":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}},"channel":{"type":["string","null"]},"requestedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}},"required":["confirmationId","fields","channel","requestedAt","expiresAt"]}}},"required":["subjectId","preferences","pendingConfirmations"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Current preference-center values for a subject.","tags":["subjects"],"x-croombit-scope":"subjects:read"}},"/v1/receipts/{id}":{"get":{"operationId":"ReceiptsController_get","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The signed payload, its detached signature and how to verify it.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"algorithm":{"type":"string","const":"EdDSA"},"kid":{"type":"string","description":"Id of the signing key — look it up in /.well-known/jwks.json."},"payload":{"type":"object","properties":{"specVersion":{"type":"string"},"receiptId":{"type":"string"},"issuedAt":{"type":"string","format":"date-time"},"environment":{"type":"string","enum":["TEST","LIVE"]},"site":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug"]},"controller":{"type":"object","properties":{"organizationId":{"type":"string"},"organization":{"type":"string"}},"required":["organizationId","organization"]},"subject":{"type":"object","properties":{"id":{"type":"string"},"identifierHashes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"hash":{"type":"string"}},"required":["type","hash"]},"description":"HMAC hashes of the subject’s identifiers — never the values."}},"required":["id","identifierHashes"]},"consents":{"type":"array","items":{"type":"object","properties":{"purpose":{"type":"string"},"purposeVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string"},"statementHash":{"type":["string","null"]},"collectedAt":{"type":"string","format":"date-time"}},"required":["purpose","purposeVersion","state","statementHash","collectedAt"]}},"collection":{"type":"object","properties":{"method":{"type":"string","description":"`api` (subject acted), `import` or `migration` (controller asserted)."},"channel":{"type":["string","null"]}},"required":["method","channel"]},"kid":{"type":"string"}},"required":["specVersion","receiptId","issuedAt","environment","site","controller","subject","consents","collection","kid"],"description":"The canonical JSON that was signed."},"signature":{"type":"string","description":"Detached Ed25519 signature over the canonicalized payload, base64url."},"verification":{"type":"object","properties":{"jwksUrl":{"type":"string"},"instructions":{"type":"string"}},"required":["jwksUrl","instructions"]}},"required":["receiptId","issuedAt","algorithm","kid","payload","signature","verification"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"Fetch a signed consent receipt (payload + detached Ed25519 signature).","tags":["receipts"]}},"/v1/receipts/{id}/verify":{"get":{"operationId":"ReceiptsController_verify","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Whether the stored signature verifies.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string"},"valid":{"type":"boolean","description":"True when the stored signature verifies against the signing key."},"kid":{"description":"Signing key id (absent when the key could not be found).","type":"string"},"reason":{"description":"Why verification failed, when the signing key is missing.","type":"string"}},"required":["receiptId","valid"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"Server-side re-verification of a stored receipt.","tags":["receipts"]}},"/v1/policy":{"get":{"operationId":"V1PolicyController_resolve","parameters":[{"name":"country","required":false,"in":"query","schema":{"example":"ES","type":"string"}}],"responses":{"200":{"description":"The policy resolved for the visitor country; empty rules when the site has none.","content":{"application/json":{"schema":{"type":"object","properties":{"requiredPurposes":{"type":"array","items":{"type":"string"},"description":"Purpose keys that cannot be declined for this visitor, sorted."},"defaultStates":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Purpose key → default consent state, from the matching rulesets."},"rejectAllParity":{"type":"boolean","description":"When true, \"reject all\" must be as prominent as \"accept all\"."},"appliedRuleSetIds":{"type":"array","items":{"type":"string"},"description":"Rulesets that matched the visitor, highest priority first."},"expiry":{"anyOf":[{"type":"object","properties":{"maxAgeDays":{"type":"number"},"purposes":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Purposes the expiry applies to; null = all."}},"required":["maxAgeDays","purposes"]},{"type":"null"}],"description":"The enabled EXPIRY policy, or null when the site has none."}},"required":["requiredPurposes","defaultStates","rejectAllParity","appliedRuleSetIds","expiry"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The resolved regulatory policy for this site (required purposes, defaults, parity).","tags":["policy"]}},"/v1/consent/tcstring":{"get":{"operationId":"V1TcfController_tcString","parameters":[{"name":"subject","required":true,"in":"query","schema":{"example":"email:a@b.com","type":"string"}}],"responses":{"200":{"description":"The TC string and the signals it encodes.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"tcString":{"type":"string","description":"IAB TCF v2.3 TC string: core + Disclosed Vendors segments."},"tcfPolicyVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vendorListVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"purposesConsent":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"TCF purpose ids the subject consented to."},"purposesLITransparency":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"vendorConsents":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"vendorLegitimateInterests":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"publisherRestrictions":{"type":"array","items":{"type":"object","properties":{"purposeId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"restrictionType":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1},{"type":"number","const":2}],"description":"0 = not allowed, 1 = require consent, 2 = require legitimate interest."},"vendorIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["purposeId","restrictionType","vendorIds"]}},"disclosedVendorIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"cmpId":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Null when no TCF configuration exists for the site."},"note":{"type":"string"}},"required":["subjectId","tcString","tcfPolicyVersion","vendorListVersion","purposesConsent","purposesLITransparency","vendorConsents","vendorLegitimateInterests","publisherRestrictions","disclosedVendorIds","cmpId","note"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Derive an IAB TCF v2.3 TC string (core + Disclosed Vendors segments) from a subject current consent state.","tags":["tcf"],"x-croombit-scope":"subjects:read"}},"/v1/consent/google-consent-mode":{"get":{"operationId":"V1TcfController_consentMode","parameters":[{"name":"subject","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The Consent Mode v2 signals (`granted` / `denied`).","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"signals":{"type":"object","properties":{"ad_storage":{"type":"string","enum":["granted","denied"]},"ad_user_data":{"type":"string","enum":["granted","denied"]},"ad_personalization":{"type":"string","enum":["granted","denied"]},"analytics_storage":{"type":"string","enum":["granted","denied"]},"functionality_storage":{"type":"string","enum":["granted","denied"]},"personalization_storage":{"type":"string","enum":["granted","denied"]},"security_storage":{"type":"string","enum":["granted","denied"]}},"required":["ad_storage","ad_user_data","ad_personalization","analytics_storage","functionality_storage","personalization_storage","security_storage"]}},"required":["subjectId","signals"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Google Consent Mode v2 signal object for a subject.","tags":["tcf"],"x-croombit-scope":"subjects:read"}},"/v1/consent/google-additional-consent":{"get":{"operationId":"V1TcfController_additionalConsent","parameters":[{"name":"subject","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The AC string and the provider ids behind it.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"acString":{"type":"string","description":"Additional Consent string, format v2: `2~<consented>~dv.<disclosed>`."},"providerConsents":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Google ad-tech provider ids the subject consented to (all disclosed providers when a MARKETING purpose is granted, else none)."},"disclosedProviders":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["subjectId","acString","providerConsents","disclosedProviders"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Google Additional Consent (AC) string for a subject — the TCF companion for Google ad-tech providers.","tags":["tcf"],"x-croombit-scope":"subjects:read"}},"/v1/tcf/vendor-list":{"get":{"operationId":"V1TcfVendorListController_vendorList","parameters":[{"name":"version","required":false,"in":"query","schema":{"example":148,"type":"string"}}],"responses":{"200":{"description":"The IAB Global Vendor List (v3) plus cache metadata.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Vendor-list version served (equals vendorListVersion)."},"fetchedAt":{"type":"string","format":"date-time","description":"When Croombit cached this version from IAB."},"gvlSpecificationVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"vendorListVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tcfPolicyVersion":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastUpdated":{"type":"string","description":"IAB's own ISO-8601 timestamp for this list."},"purposes":{"description":"Purpose id → { id, name, description, illustrations }.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"specialPurposes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"specialFeatures":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"standardTexts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"stacks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dataCategories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"vendors":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"type":"string"},"purposes":{"description":"Purposes the vendor processes on the basis of consent.","type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"legIntPurposes":{"description":"Purposes on the basis of legitimate interest.","type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"flexiblePurposes":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"specialPurposes":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"features":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"specialFeatures":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["id"],"additionalProperties":{}},"description":"Vendor id → vendor. Carries further IAB fields (urls, cookieMaxAgeSeconds, dataRetention, …) as published by IAB."}},"required":["version","fetchedAt","vendorListVersion","tcfPolicyVersion","lastUpdated","vendors"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The cached IAB Global Vendor List — latest, or a specific ?version=. For a CMP client’s __tcfapi getVendorList.","tags":["tcf"]}},"/v1/banner":{"get":{"operationId":"V1BannerController_get","parameters":[{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}},{"name":"country","required":false,"in":"query","description":"ISO country; overrides the geo header.","schema":{"example":"ES","type":"string"}},{"name":"region","required":false,"in":"query","description":"Subdivision (e.g. a US state) for finer geo rules.","schema":{"example":"CA","type":"string"}},{"name":"abVariant","required":false,"in":"query","description":"Sticky A/B variant version ID previously assigned to this visitor.","schema":{"type":"string"}},{"name":"x-vercel-ip-country","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-vercel-ip-country-region","required":true,"in":"header","schema":{"type":"string"}},{"name":"cf-ipcountry","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"The published banner. 404 until a version is published.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Published banner version. Consent records should cite it as `bannerVersion`."},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"]},"label":{"type":["string","null"]},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"layout":{"type":"string","enum":["BAR","BOX","MODAL","WALL","TABS"]},"position":{"type":"string","enum":["TOP","BOTTOM","BOTTOM_LEFT","BOTTOM_RIGHT","CENTER"]},"theme":{"type":"object","properties":{"accent":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"background":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"text":{"type":"string","pattern":"^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"},"radius":{"type":"integer","minimum":0,"maximum":32},"logoUrl":{"type":"string","maxLength":2048,"format":"uri"},"fontFamily":{"type":"string","maxLength":200,"pattern":"^[\\w\\s,'\"-]+$"},"overlay":{"type":"boolean"},"customCss":{"type":"string","maxLength":8000}}},"behavior":{"type":"object","properties":{"showDenyButton":{"type":"boolean"},"denyAsLink":{"type":"boolean"},"granularToggles":{"type":"boolean"},"respectGpc":{"type":"boolean"},"closeIsReject":{"type":"boolean"},"reconsentAfterDays":{"type":"integer","minimum":1,"maximum":3650},"hideAfterDays":{"type":"integer","minimum":0,"maximum":3650},"showLocaleSelector":{"type":"boolean"},"inlineDetails":{"type":"string","enum":["none","categories","cookies"]},"buttonLayout":{"type":"string","enum":["accept-reject","accept-customize-reject","accept-only"]},"showBranding":{"type":"boolean"},"checkboxStyle":{"type":"string","enum":["default","card"]},"mobileLayout":{"type":"string","enum":["compact","desktop"]},"mobilePlacement":{"type":"object","properties":{"layout":{"type":"string","enum":["BAR","BOX"]},"position":{"type":"string","enum":["TOP","BOTTOM","BOTTOM_LEFT","BOTTOM_RIGHT","CENTER"]}},"required":["layout","position"]},"crossDomainSync":{"type":"boolean"},"floatingButton":{"type":"object","properties":{"enabled":{"default":false,"type":"boolean"},"position":{"default":"BOTTOM_RIGHT","type":"string","enum":["BOTTOM_LEFT","BOTTOM_RIGHT"]}},"required":["enabled","position"]}}},"purposeKeys":{"type":"array","items":{"type":"string"},"description":"Purposes shown as toggles, in order. Empty = every published purpose."},"geoRules":{"type":"array","items":{"type":"object","properties":{"jurisdictionCode":{"type":"string","minLength":2,"maxLength":12},"mode":{"type":"string","enum":["OPT_IN","OPT_OUT","NOTICE_ONLY","OFF"]},"defaultChecked":{"default":[],"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"}}},"required":["jurisdictionCode","mode","defaultChecked"]},"description":"All region rules of this published version."},"region":{"type":"object","properties":{"jurisdiction":{"description":"The jurisdiction code of the geo rule that matched this visitor, or null.","type":["string","null"]},"mode":{"type":"string","enum":["OPT_IN","OPT_OUT","NOTICE_ONLY","OFF"],"description":"How to treat this visitor. Defaults to OPT_IN when no rule matches."},"defaultChecked":{"type":"array","items":{"type":"string"}},"gdprApplies":{"type":"boolean"},"country":{"description":"The country the region was resolved from (query override or geo header), null if unknown.","type":["string","null"]}},"required":["jurisdiction","mode","defaultChecked","gdprApplies","country"],"description":"Behaviour resolved for this visitor from the country / region."},"siteId":{"type":"string","description":"The site this banner belongs to — cmp.js keys the stored decision by it."},"cookieDomains":{"type":"array","items":{"type":"string"},"description":"Hosts of the site that count in this mode (LIVE: verified only). cmp.js scopes the decision cookie to the one the page is on, so www. and the bare domain share it."},"locale":{"description":"Locale of `text`; null when the banner has no copy.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"text":{"anyOf":[{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":4000},"acceptAll":{"type":"string","minLength":1,"maxLength":80},"rejectAll":{"type":"string","minLength":1,"maxLength":80},"manage":{"type":"string","minLength":1,"maxLength":80},"save":{"type":"string","minLength":1,"maxLength":80},"customize":{"type":"string","maxLength":80},"privacyLinkUrl":{"type":"string","maxLength":2048,"format":"uri"},"privacyLinkLabel":{"type":"string","maxLength":120},"required":{"type":"string","maxLength":80},"showDetails":{"type":"string","maxLength":80},"hideDetails":{"type":"string","maxLength":80}},"required":["title","body","acceptAll","rejectAll","manage","save"]},{"type":"null"}],"description":"Copy for `locale`."},"texts":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z]{2}(?:-[A-Z]{2})?$"},"additionalProperties":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":4000},"acceptAll":{"type":"string","minLength":1,"maxLength":80},"rejectAll":{"type":"string","minLength":1,"maxLength":80},"manage":{"type":"string","minLength":1,"maxLength":80},"save":{"type":"string","minLength":1,"maxLength":80},"customize":{"type":"string","maxLength":80},"privacyLinkUrl":{"type":"string","maxLength":2048,"format":"uri"},"privacyLinkLabel":{"type":"string","maxLength":120},"required":{"type":"string","maxLength":80},"showDetails":{"type":"string","maxLength":80},"hideDetails":{"type":"string","maxLength":80}},"required":["title","body","acceptAll","rejectAll","manage","save"]},"description":"Copy for every locale, keyed by locale."},"abTest":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"variantVersionId":{"type":"string","description":"Send back as `abVariant` on later requests to stay on this variant; forward as `metadata.abVariant` (with `metadata.abTestId`) on the consent this banner collects."},"variantLabel":{"type":"string"},"endsAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"The test's scheduled end, if any — a stored assignment can expire then."}},"required":["id","variantVersionId","variantLabel","endsAt"]},{"type":"null"}],"description":"Set when an A/B test is running. Without a valid `abVariant` the variant is drawn at random and the response is `no-store`; with one it is deterministic and cacheable."}},"required":["version","changeType","label","effectiveAt","layout","position","theme","behavior","purposeKeys","geoRules","region","siteId","cookieDomains","locale","availableLocales","text","texts","abTest"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The current published consent-banner design for this site — layout, theme, behaviour, per-locale copy, and the region behaviour resolved from the visitor country (query override or the Vercel/CF geo header) against the banner geo rules.","tags":["banner"]}},"/v1/consent/gpp":{"get":{"operationId":"V1GppController_gppString","parameters":[{"name":"subject","required":true,"in":"query","schema":{"example":"email:a@b.com","type":"string"}},{"name":"country","required":false,"in":"query","description":"ISO country; overrides the geo header.","schema":{"type":"string"}},{"name":"region","required":false,"in":"query","schema":{"type":"string"}},{"name":"gpc","required":false,"in":"query","description":"1 / true to force the GPC opt-out.","schema":{"type":"string"}},{"name":"sec-gpc","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-vercel-ip-country","required":true,"in":"header","schema":{"type":"string"}},{"name":"x-vercel-ip-country-region","required":true,"in":"header","schema":{"type":"string"}},{"name":"cf-ipcountry","required":true,"in":"header","schema":{"type":"string"}}],"responses":{"200":{"description":"The GPP string, its sections and which apply.","content":{"application/json":{"schema":{"type":"object","properties":{"subjectId":{"type":"string"},"gppString":{"type":"string","description":"The assembled IAB GPP string."},"sectionIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"GPP section ids present in the string (2 = tcfeuv2, 7 = usnat)."},"sections":{"type":"object","properties":{"tcfeuv2":{"description":"Present when the site has a TCF configuration.","type":"string"},"usnat":{"description":"Present when the US National section is enabled.","type":"string"}},"description":"The individual encoded sections."},"applicableSections":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Sections that apply to the request’s country/region."},"gpcApplied":{"type":"boolean","description":"True when a Global Privacy Control signal (?gpc=1 / Sec-GPC) forced the opt-out."}},"required":["subjectId","gppString","sectionIds","sections","applicableSections","gpcApplied"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Assemble an IAB GPP string for a subject — the tcfeuv2 section (when TCF is configured) and the usnat (US National) section derived from consent state. Honours a GPC signal (?gpc=1 or the Sec-GPC header) as an opt-out of sale / sharing / targeted advertising.","tags":["tcf"],"x-croombit-scope":"subjects:read"}},"/v1/data-requests":{"post":{"operationId":"V1DsarController_create","parameters":[],"responses":{"201":{"description":"The created data request.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EXPORT","ERASURE","RECTIFICATION"]},"status":{"type":"string","enum":["PENDING_VERIFICATION","PENDING","PROCESSING","COMPLETED","FAILED"]},"subjectId":{"type":"string"}},"required":["id","type","status","subjectId"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Raise a data-subject request (export / erasure / rectification).","tags":["dsar"],"x-croombit-scope":"dsar:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"type":{"type":"string","enum":["EXPORT","ERASURE","RECTIFICATION"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["subject","type"]}}}}}},"/v1/data-requests/portal":{"post":{"operationId":"V1DsarPortalController_create","parameters":[],"responses":{"201":{"description":"The request, awaiting identity verification.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EXPORT","ERASURE","RECTIFICATION"]},"status":{"type":"string","enum":["PENDING_VERIFICATION","PENDING","PROCESSING","COMPLETED","FAILED"],"description":"PENDING_VERIFICATION until the subject confirms via the verification link."},"verificationToken":{"description":"Only present for a secret (sk_) key, which relays it to the subject itself. Never returned to a publishable key.","type":"string"}},"required":["id","type","status"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Submit a data-subject request from the self-service portal (pk_ or sk_ key). A pk_ caller never receives the verificationToken — it is only delivered by email (Resend must be configured). Only a trusted sk_ caller may self-relay the token through its own email system.","tags":["dsar"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"identifiers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["EMAIL","PHONE","EXTERNAL_ID","DEVICE_ID","COOKIE_ID","CUSTOM"]},"value":{"type":"string","minLength":1,"maxLength":320},"isPrimary":{"type":"boolean"}},"required":["type","value"]}}},"required":["identifiers"]}]},"type":{"type":"string","enum":["EXPORT","ERASURE","RECTIFICATION"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"turnstileToken":{"type":"string","maxLength":4096},"locale":{"type":"string","pattern":"^[a-z]{2}(-[A-Za-z]{2})?$"}},"required":["subject","type"]}}}}}},"/v1/data-requests/verify":{"post":{"operationId":"V1DsarVerifyController_verify","parameters":[],"responses":{"201":{"description":"The verified request; carries the upload token when an identity document is required.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["EXPORT","ERASURE","RECTIFICATION"]},"siteId":{"type":"string"},"identityDocumentRequired":{"type":"boolean","description":"When true, the subject must upload an ID document before the request can be processed."},"uploadToken":{"description":"Capability token for the identity-document upload; present only when identityDocumentRequired.","type":"string"}},"required":["id","type","siteId","identityDocumentRequired"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"Confirm a data subject's identity from a verification link. Transitions the request from PENDING_VERIFICATION to PENDING (DPO queue).","tags":["dsar"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]}}}}}},"/v1/data-requests/{id}/identity-document":{"post":{"operationId":"V1DsarIdentityDocumentController_submit","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"token":{"type":"string"},"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"The stored document, awaiting manual review.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The identity document id."},"status":{"type":"string","enum":["SUBMITTED","APPROVED","REJECTED"],"description":"Always SUBMITTED on upload; a DPO reviews it manually."}},"required":["id","status"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"Upload a photo/scan of an ID document (no auth — the upload token from POST verify is the capability). Reviewed manually before the request can be processed.","tags":["dsar"]}},"/v1/regulatory-documents/{type}":{"get":{"operationId":"V1RegulatoryDocumentsController_getPublished","parameters":[{"name":"type","required":true,"in":"path","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}}],"responses":{"200":{"description":"The published document, resolved to one locale. 404 until published.","content":{"application/json":{"schema":{"type":"object","properties":{"documentType":{"type":"string","enum":["PRIVACY_POLICY","COOKIE_POLICY","TERMS_OF_SERVICE","ACCESSIBILITY_STATEMENT"]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"frameworks":{"type":"array","items":{"type":"string","enum":["GDPR","CCPA","LGPD","PIPEDA"]}},"publishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locale":{"description":"Locale of title/body: the requested one, else the site default, else the first available.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"title":{"type":["string","null"]},"body":{"description":"Sanitised rich-text HTML. {{PREFERENCE_CENTER_URL}} is already resolved: to Site.preferenceCenterUrl, or the static [Preference center URL] bracket if unset.","type":["string","null"]}},"required":["documentType","version","frameworks","publishedAt","locale","availableLocales","title","body"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The published Privacy Policy / Cookie Policy for this site.","tags":["regulatory-documents"]}},"/v1/ping":{"get":{"operationId":"V1Controller_ping","parameters":[],"responses":{"200":{"description":"The site, environment and key type the presented key resolves to.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"site":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["id","slug","name"]},{"type":"null"}]},"environment":{"type":"string","enum":["TEST","LIVE"],"description":"Derived from the key prefix."},"keyType":{"type":"string","enum":["PUBLISHABLE","SECRET"]},"ts":{"type":"string","format":"date-time","description":"Server time."}},"required":["ok","site","environment","keyType","ts"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"Echo the resolved site, environment and key type for the presented API key.","tags":["diagnostics"]}},"/v1/webhook-events":{"get":{"description":"Every event type an endpoint can subscribe to (with when it fires and the keys of its `data`), plus the exact header names, signature scheme, timeout and retry schedule of a delivery. Use it to discover events at runtime instead of hard-coding a list; verify signatures with `verifyWebhookSignature` from `@croombit/sdk/server`.","operationId":"V1Controller_webhookEvents","parameters":[],"responses":{"200":{"description":"The event catalog and the delivery contract.","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["consent.granted","consent.updated","consent.withdrawn","consent.expired","reconsent.required","preference.updated","preference.confirmation_requested","preference.confirmed","preference.confirmation_email_sent","preference.confirmation_email_failed","subject.merged","subject.erased","cookie.scan_completed","site.domain_verified","site.domain_unverified","quota.alert","dsar.verification_requested","dsar.identity_verified","dsar.identity_document_submitted","dsar.identity_document_approved","dsar.identity_document_rejected"]},"description":{"type":"string","description":"When the event fires."},"data":{"type":"array","items":{"type":"string"},"description":"Keys of the delivery’s `data` object (`?` suffix = not always present)."}},"required":["type","description","data"]}},"delivery":{"type":"object","properties":{"method":{"type":"string"},"contentType":{"type":"string"},"headers":{"type":"object","properties":{"event":{"type":"string"},"delivery":{"type":"string"},"signature":{"type":"string"}},"required":["event","delivery","signature"]},"signature":{"type":"object","properties":{"header":{"type":"string"},"format":{"type":"string"},"multipleV1":{"type":"string"},"algorithm":{"type":"string"},"signedPayload":{"type":"string"},"secret":{"type":"string"},"toleranceSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["header","format","multipleV1","algorithm","signedPayload","secret","toleranceSeconds"]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The envelope of every delivery, key → description."},"success":{"type":"string"},"retryDelaysSeconds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Delay before each retry attempt."},"verifyWith":{"type":"string"}},"required":["method","contentType","headers","signature","payload","success","retryDelaysSeconds","verifyWith"],"description":"How every delivery is signed and retried."}},"required":["events","delivery"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The webhook event catalog and delivery contract.","tags":["diagnostics","webhooks"]}},"/v1/purposes":{"get":{"operationId":"V1DefinitionsController_listPurposes","parameters":[{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}}],"responses":{"200":{"description":"Published purposes (resolved to one locale each) and dependency rules.","content":{"application/json":{"schema":{"type":"object","properties":{"purposes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable purpose key — what consent records cite."},"purposeType":{"type":"string","enum":["COOKIE_CATEGORY","CONSENT_STATEMENT"],"description":"COOKIE_CATEGORY is rendered as a banner toggle; CONSENT_STATEMENT is a standalone statement."},"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","DATA_SHARING","CUSTOM"]},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"required":{"type":"boolean","description":"True when the purpose cannot be declined."},"defaultState":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED"]},"tcfPurposeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"IAB TCF purpose ids this purpose maps to."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The published version number every consent record will cite."},"label":{"description":"Optional human tag for the version (e.g. \"v1.0\", \"2024-05-01\").","type":["string","null"]},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"],"description":"Whether this version required re-consent."},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locale":{"description":"The locale of `text`: the requested one, else the site default, else the first available. Null if there is no text.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"text":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"linkUrl":{"description":"Optional \"learn more\" link for this text.","type":["string","null"]}},"required":["title","body","linkUrl"]},{"type":"null"}]}},"required":["key","purposeType","category","legalBasis","required","defaultState","tcfPurposeIds","version","label","changeType","effectiveAt","locale","availableLocales","text"]},"description":"Ordered by key."},"dependencyRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"when":{"description":"JSON-logic expression evaluated against the visitor's current selections."},"effect":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}},"require":{"type":"array","items":{"type":"string"}},"optional":{"type":"array","items":{"type":"string"}}},"description":"Keys to show / hide / require / make optional when `when` matches."}},"required":["id","when","effect"]},"description":"Cross-purpose dependency rules, in author order."}},"required":["purposes","dependencyRules"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"List the published consent purposes for this site, plus dependency rules.","tags":["purposes"]}},"/v1/purposes/{key}/current":{"get":{"operationId":"V1DefinitionsController_getPurpose","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}}],"responses":{"200":{"description":"The purpose's current published version.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Stable purpose key — what consent records cite."},"purposeType":{"type":"string","enum":["COOKIE_CATEGORY","CONSENT_STATEMENT"],"description":"COOKIE_CATEGORY is rendered as a banner toggle; CONSENT_STATEMENT is a standalone statement."},"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","DATA_SHARING","CUSTOM"]},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"required":{"type":"boolean","description":"True when the purpose cannot be declined."},"defaultState":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED"]},"tcfPurposeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"IAB TCF purpose ids this purpose maps to."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The published version number every consent record will cite."},"label":{"description":"Optional human tag for the version (e.g. \"v1.0\", \"2024-05-01\").","type":["string","null"]},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"],"description":"Whether this version required re-consent."},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locale":{"description":"The locale of `text`: the requested one, else the site default, else the first available. Null if there is no text.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"text":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"linkUrl":{"description":"Optional \"learn more\" link for this text.","type":["string","null"]}},"required":["title","body","linkUrl"]},{"type":"null"}]}},"required":["key","purposeType","category","legalBasis","required","defaultState","tcfPurposeIds","version","label","changeType","effectiveAt","locale","availableLocales","text"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The current published version of one purpose, with its text.","tags":["purposes"]}},"/v1/cookie-categories":{"get":{"operationId":"V1DefinitionsController_listCookieCategories","parameters":[{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}}],"responses":{"200":{"description":"Published cookie categories (resolved to one locale each) and dependency rules.","content":{"application/json":{"schema":{"type":"object","properties":{"purposes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable purpose key — what consent records cite."},"purposeType":{"type":"string","enum":["COOKIE_CATEGORY","CONSENT_STATEMENT"],"description":"COOKIE_CATEGORY is rendered as a banner toggle; CONSENT_STATEMENT is a standalone statement."},"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","DATA_SHARING","CUSTOM"]},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"required":{"type":"boolean","description":"True when the purpose cannot be declined."},"defaultState":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED"]},"tcfPurposeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"IAB TCF purpose ids this purpose maps to."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The published version number every consent record will cite."},"label":{"description":"Optional human tag for the version (e.g. \"v1.0\", \"2024-05-01\").","type":["string","null"]},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"],"description":"Whether this version required re-consent."},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locale":{"description":"The locale of `text`: the requested one, else the site default, else the first available. Null if there is no text.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"text":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"linkUrl":{"description":"Optional \"learn more\" link for this text.","type":["string","null"]}},"required":["title","body","linkUrl"]},{"type":"null"}]}},"required":["key","purposeType","category","legalBasis","required","defaultState","tcfPurposeIds","version","label","changeType","effectiveAt","locale","availableLocales","text"]},"description":"Ordered by key."},"dependencyRules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"when":{"description":"JSON-logic expression evaluated against the visitor's current selections."},"effect":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}},"require":{"type":"array","items":{"type":"string"}},"optional":{"type":"array","items":{"type":"string"}}},"description":"Keys to show / hide / require / make optional when `when` matches."}},"required":["id","when","effect"]},"description":"Cross-purpose dependency rules, in author order."}},"required":["purposes","dependencyRules"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"List the published cookie categories for this site (what the banner renders), plus dependency rules.","tags":["purposes"]}},"/v1/cookie-categories/{key}/current":{"get":{"operationId":"V1DefinitionsController_getCookieCategory","parameters":[{"name":"key","required":true,"in":"path","schema":{"type":"string"}},{"name":"locale","required":false,"in":"query","schema":{"example":"es","type":"string"}}],"responses":{"200":{"description":"The cookie category's current published version.","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Stable purpose key — what consent records cite."},"purposeType":{"type":"string","enum":["COOKIE_CATEGORY","CONSENT_STATEMENT"],"description":"COOKIE_CATEGORY is rendered as a banner toggle; CONSENT_STATEMENT is a standalone statement."},"category":{"type":"string","enum":["NECESSARY","FUNCTIONAL","ANALYTICS","MARKETING","PERSONALIZATION","DATA_SHARING","CUSTOM"]},"legalBasis":{"type":"string","enum":["CONSENT","LEGITIMATE_INTEREST","CONTRACT","LEGAL_OBLIGATION","VITAL_INTEREST","PUBLIC_TASK"]},"required":{"type":"boolean","description":"True when the purpose cannot be declined."},"defaultState":{"type":"string","enum":["NOT_GIVEN","GRANTED","DENIED"]},"tcfPurposeIds":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"IAB TCF purpose ids this purpose maps to."},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The published version number every consent record will cite."},"label":{"description":"Optional human tag for the version (e.g. \"v1.0\", \"2024-05-01\").","type":["string","null"]},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"],"description":"Whether this version required re-consent."},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"locale":{"description":"The locale of `text`: the requested one, else the site default, else the first available. Null if there is no text.","type":["string","null"]},"availableLocales":{"type":"array","items":{"type":"string"}},"text":{"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"},"linkUrl":{"description":"Optional \"learn more\" link for this text.","type":["string","null"]}},"required":["title","body","linkUrl"]},{"type":"null"}]}},"required":["key","purposeType","category","legalBasis","required","defaultState","tcfPurposeIds","version","label","changeType","effectiveAt","locale","availableLocales","text"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The current published version of one cookie category, with its text.","tags":["purposes"]}},"/v1/preference-template":{"get":{"operationId":"V1DefinitionsController_getPreferenceTemplate","parameters":[],"responses":{"200":{"description":"The current published preference center.","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"changeType":{"type":"string","enum":["DISPLAY_ONLY","RECONSENT_REQUIRED"]},"effectiveAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"channels":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"label":{"type":"string","minLength":1,"maxLength":120},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","label","sortOrder"]}},"topics":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"label":{"type":"string","minLength":1,"maxLength":120},"groupLabel":{"type":"string","maxLength":120},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","label","sortOrder"]}},"entries":{"type":"array","items":{"type":"object","properties":{"channelKey":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"topicKey":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"required":{"default":false,"type":"boolean"},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["channelKey","topicKey","required","sortOrder"]},"description":"Composed preferences: one (channel × topic) pair each."},"fields":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":2,"maxLength":64,"pattern":"^[a-z0-9](?:[a-z0-9_-]*[a-z0-9])?$"},"label":{"type":"string","minLength":1,"maxLength":160},"type":{"type":"string","enum":["BOOLEAN","SINGLE_SELECT","MULTI_SELECT","SCALE"]},"options":{"default":[],"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value","label"]}},"required":{"default":false,"type":"boolean"},"dependsOn":{"default":[],"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":500},"when":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},"effect":{"type":"object","properties":{"show":{"type":"array","items":{"type":"string"}},"hide":{"type":"array","items":{"type":"string"}},"require":{"type":"array","items":{"type":"string"}},"optional":{"type":"array","items":{"type":"string"}}}}},"required":["when","effect"]}},"sortOrder":{"default":0,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["key","label","type","options","required","dependsOn","sortOrder"]}}},"required":["version","changeType","effectiveAt","channels","topics","entries","fields"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"summary":"The current published preference center: channels, topics, composed entries (channel × topic, with required), and fields.","tags":["purposes"]}},"/v1/consent-sync/origins":{"get":{"operationId":"V1ConsentSyncOriginsController_allowedOrigins","parameters":[{"name":"pk","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Allowed origins; an empty list for any invalid, unknown or non-publishable key.","content":{"application/json":{"schema":{"type":"object","properties":{"origins":{"type":"array","items":{"type":"string"},"description":"Lower-cased hosts the publishable key may embed from. Empty for any invalid / unknown / non-publishable key."}},"required":["origins"]}}}},"429":{"description":"Rate limit exceeded for this API key (or caller IP). Retry after `Retry-After` seconds.","headers":{"RateLimit-Limit":{"description":"Requests allowed in the current window for this API key.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"hint":{"type":"string"}}}}}}},"summary":"The domains a site's publishable key is allowed to embed/sync from.","tags":["diagnostics"]}}},"info":{"title":"Croombit API","description":"One REST API for consent, preferences and cookies. Every request is authenticated with an API key (`Authorization: Bearer sk_live_… / sk_test_… / pk_live_… / pk_test_…`) — the prefix selects live or test data, and the two never mix. `pk_` keys are Origin-restricted (or, with \"Allow native apps\", Origin-less for iOS/Android apps); `sk_` keys are server-only.\n\n**Identified subjects.** A `pk_` key on its own only reaches anonymous subjects (device/cookie ids). To read or write an identified person (`email:`, `phone:`, `external_id:`, `custom:`) with a `pk_` key, also send `X-Tc-Identity: <identity token>` — a short-lived HS256 JWT your backend signs for that person with the site identity secret (`signIdentityToken` in `@croombit/sdk/server`). Without it: `403 identity_token_required`; an invalid token: `401 invalid_identity_token`. `sk_` keys never need one.\n\n**Key scopes.** A secret key can be restricted to scopes (`consent:write`, `subjects:read`, `subjects:write`, `dsar:write`, `scans:write`); each operation lists the one it needs as `x-croombit-scope`. A key with no scopes has full access. Keys can also carry an IP allowlist (`403 ip_not_allowed`) and an expiry (`401 key_expired`). LIVE `pk_` keys only accept Origins on verified site domains (`403 origin_not_verified`).\n\n**Rate limits.** Each API key has a per-second and a per-minute request budget set by the plan (secret keys: Hobby 10/s · 60/min, Starter 50/s · 600/min, Pro 100/s · 1,500/min, Scale 200/s · 3,000/min; publishable keys, which carry every visitor's banner reads: Hobby 50/s · 1,200/min, Starter 200/s · 6,000/min, Pro 500/s · 15,000/min, Scale 1,000/s · 30,000/min — Scale contracts can raise them), plus a per-IP limit. Every /v1 response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds); past the budget the API answers `429 rate_limited` with `Retry-After`.","version":"1","contact":{}},"tags":[],"servers":[{"url":"https://api.croombit.com"}],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"A Croombit API key, e.g. sk_test_… (test) or sk_live_… (live)."},"identityToken":{"type":"apiKey","in":"header","name":"X-Tc-Identity","description":"Identity token (HS256 JWT, kid = identity secret id, aud \"croombit:identity\", sub = the person, ≤ 24 h). Required with a pk_ key for any identified subject."}},"schemas":{}}}