Replace the consent in an organization
https://forumulate.com/api /orgs/{orgId}/consent Sets the organization's default cookie-consent banner (hosted, managed, a CMP such as Cookiebot or OneTrust, custom, or none) that every inheriting space uses, and purges their caches. ?validate=true is a dry run that writes nothing; the webhook secret is never echoed.
Requires token scope: write (the coarse method gate) for Atlas key (ak_), Personal Access Token (cft_) or OAuth (cfo_) auth — in addition to any catalog scope (GET /pats/scopes) the route’s capability needs. Session/cookie auth is governed by RBAC capabilities instead.
Parameters
orgIdstringpathrequiredvalidatestringqueryResolvedConsentConfig, writing NOTHING. Use it to discover the shape without mutating live config. Use true or false (true/1/yes/on and false/0/no/off are accepted).forumulate-versionstringheaderforumulate-version: 2026-12-01 on every request from a new integration; it is optional only so that integrations written before versioning keep working. Each version includes everything before it:Idempotency-Keystringheader409. The key is scoped to the method and path, so the same key on a different endpoint is a different request. Error responses of 5xx are never cached — those retries re-run. A key is bound to the BODY it was first used with: reusing it with a different body is a 409 idempotency.key_reused, not a replay, because replaying would tell you a write landed that never ran. Generate one key per request, never per process or per session.Request body application/json
An org (or, inside a space override, a space) consent configuration. Attacker-influenced tenant input, validated hard: no free-text HTML anywhere, and a raw custom loader is accepted only from a host the org has verified.
providerstringrequiredhosted is our own banner; managed provisions a CookieMunch site under our key; none is essential-only; custom is bring-your-own.presetobjectprovider: cookiemunch→cbid, cookiebot→cbid, onetrust→dataDomainScript, osano→customerId, termly→websiteUuid. Saving a native provider without its id is a 422 validation.failed naming the field (e.g. preset.cbid). hosted/managed/none/inherit take no preset.Show child parameters
cbidstringdataDomainScriptstringcustomerIdstringwebsiteUuidstringcustomobjectprovider: custom only. adapterApi opens a preference-centre URL (works anywhere); loader injects a raw vendor script, allowed ONLY when its host is a verified org domain.Show child parameters
modestringsettingsUrlstringstateUrlstringloaderUrlstringhostedobjectprovider: hosted — structured banner fields (categories, copy, links, theme). Never raw HTML.policyVersionstringwebhookSecretstringconsent/webhook-secret to mint one. Never returned by any GET.{
"provider": "inherit",
"preset": {
"cbid": "string",
"dataDomainScript": "string",
"customerId": "string",
"websiteUuid": "string"
},
"custom": {
"mode": "adapterApi",
"settingsUrl": "string",
"stateUrl": "string",
"loaderUrl": "string"
},
"hosted": {},
"policyVersion": "string",
"webhookSecret": "string"
}cURL
curl -X PUT "https://forumulate.com/api/orgs/{orgId}/consent?validate=" \
-H "forumulate-version: <value>" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/json" \
-d '{"provider":"inherit","preset":{"cbid":"string","dataDomainScript":"string","customerId":"string","websiteUuid":"string"},"custom":{"mode":"adapterApi","settingsUrl":"string","stateUrl":"string","loaderUrl":"string"},"hosted":{},"policyVersion":"string","webhookSecret":"string"}'TypeScript
const res = await fetch('https://forumulate.com/api/orgs/{orgId}/consent?validate=', {
method: 'PUT',
headers: {
'forumulate-version': '<value>',
'Idempotency-Key': '<value>',
'Content-Type': 'application/json',
},
body: JSON.stringify({"provider":"inherit","preset":{"cbid":"string","dataDomainScript":"string","customerId":"string","websiteUuid":"string"},"custom":{"mode":"adapterApi","settingsUrl":"string","stateUrl":"string","loaderUrl":"string"},"hosted":{},"policyVersion":"string","webhookSecret":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"PUT",
"https://forumulate.com/api/orgs/{orgId}/consent?validate=",
headers={
"forumulate-version": "<value>",
"Idempotency-Key": "<value>",
"Content-Type": "application/json",
},
json={"provider": "inherit", "preset": {"cbid": "string", "dataDomainScript": "string", "customerId": "string", "websiteUuid": "string"}, "custom": {"mode": "adapterApi", "settingsUrl": "string", "stateUrl": "string", "loaderUrl": "string"}, "hosted": {}, "policyVersion": "string", "webhookSecret": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("PUT", "https://forumulate.com/api/orgs/{orgId}/consent?validate=", strings.NewReader(`{"provider":"inherit","preset":{"cbid":"string","dataDomainScript":"string","customerId":"string","websiteUuid":"string"},"custom":{"mode":"adapterApi","settingsUrl":"string","stateUrl":"string","loaderUrl":"string"},"hosted":{},"policyVersion":"string","webhookSecret":"string"}`))
req.Header.Set("forumulate-version", "<value>")
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://forumulate.com/api/orgs/{orgId}/consent?validate=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['forumulate-version: <value>', 'Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"provider":"inherit","preset":{"cbid":"string","dataDomainScript":"string","customerId":"string","websiteUuid":"string"},"custom":{"mode":"adapterApi","settingsUrl":"string","stateUrl":"string","loaderUrl":"string"},"hosted":{},"policyVersion":"string","webhookSecret":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://forumulate.com/api/orgs/{orgId}/consent?validate=')
req = Net::HTTP::Put.new(uri)
req['forumulate-version'] = '<value>'
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"provider":"inherit","preset":{"cbid":"string","dataDomainScript":"string","customerId":"string","websiteUuid":"string"},"custom":{"mode":"adapterApi","settingsUrl":"string","stateUrl":"string","loaderUrl":"string"},"hosted":{},"policyVersion":"string","webhookSecret":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://forumulate.com/api/orgs/{orgId}/consent?validate="))
.header("forumulate-version", "<value>")
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/json")
.method("PUT", BodyPublishers.ofString("{\"provider\":\"inherit\",\"preset\":{\"cbid\":\"string\",\"dataDomainScript\":\"string\",\"customerId\":\"string\",\"websiteUuid\":\"string\"},\"custom\":{\"mode\":\"adapterApi\",\"settingsUrl\":\"string\",\"stateUrl\":\"string\",\"loaderUrl\":\"string\"},\"hosted\":{},\"policyVersion\":\"string\",\"webhookSecret\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
?validate=true, the ResolvedConsentConfig that WOULD result (nothing written).Example
{
"provider": "string",
"preset": {
"cbid": "string",
"dataDomainScript": "string",
"customerId": "string",
"websiteUuid": "string"
},
"policyVersion": "string",
"status": "active",
"reason": "string",
"webhookSecretSet": true,
"webhookConfigured": true,
"webhookVerifiedAt": "string",
"webhookLastEventType": "string",
"webhookUrl": "string",
"warnings": [
"tags: \"Launch Day\" is stored as \"launch-day\""
]
}Schema
providerstringpresetobjectprovider: cookiemunch→cbid, cookiebot→cbid, onetrust→dataDomainScript, osano→customerId, termly→websiteUuid. Saving a native provider without its id is a 422 validation.failed naming the field (e.g. preset.cbid). hosted/managed/none/inherit take no preset.Show child parameters
cbidstringdataDomainScriptstringcustomerIdstringwebsiteUuidstringpolicyVersionstringstatusstringactive: a provider is set with every id it needs. misconfigured: a provider is set but a required id is missing (a banner will NOT render). inactive: none/inherit/unset.reasonstringMissing required field preset.cbid …).webhookSecretSetbooleanwebhookConfiguredbooleanwebhookVerifiedAtstringwebhookLastEventTypestringwebhookUrlstringwarningsstring[][]. The same sentences are on the X-Field-Warnings response header. If this is present, something you sent is not what is stored; read the resource back rather than assuming your own value.request.malformed). A value that was understood but is not acceptable is a 422 validation.failed.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.auth.required). Send a Bearer token or the session cookie.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.rbac.forbidden, whether what is missing is the capability, the token scope, or a resource the token is pinned away from. The message names the capability and, for a scope refusal, the scopes that would grant it. A refusal because of the PLAN is a 402 with quota.exceeded, not this.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.*.not_found).Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.validation.failed). error.details names the field paths.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.Example
{
"error": {
"code": "string",
"message": "string",
"details": {},
"docs": "string",
"reason": "string",
"slugs": [
"string"
],
"conflict": {
"etag": "string",
"ops": [
null
]
}
},
"requestId": "string"
}Schema
errorobjectrequiredShow child parameters
codestringrequiredrbac.forbidden.messagestringrequireddetailsobjectdocsstringGET /space-types/{type}/presets. Present on errors over a controlled list, so the answer to "what am I allowed to send?" is in the error itself.reasonstringiat_too_old, iat_in_future, bad_signature, bad_issuer, bad_audience, expired and more. Branch on this, not on message.slugsstring[]space.slug_taken, page.slug_taken, collection.slug_taken, site.slug_taken or badge.slug_taken.conflictobjectPATCH …/entries/{entryId}/fields) whose If-Match was stale.Show child parameters
etagstringrequiredopsarrayrequiredIf-Match that touch a path your own operations touch. Empty: none did — retry the batch unchanged under etag. null: the history no longer reaches your tag — re-read the entry first.requestIdstringx-request-id and x-forumulate-request-id response headers. Quote it in a bug report: it is the only thing that finds your exact request in our logs. It is in the body because that is the part that survives — an SDK that throws the parsed body, a serverless log that keeps the body and drops the headers, a ticket with the JSON pasted in.