POST/v1/consent

Record consent

Use this when you collect consent outside the built-in Script Tag dialog or need to sync a CMP result into wavebird.

Auth: Secret key, or activation token for browser flows

Request parameters

NameTypeRequiredDescription
client_idstringYesProject identifier.
session_idstringYesPublisher session identifier.
sourcestringYesConsent source, such as publisher, cmp, or wavebird.
purposesobjectYesPurpose-level consent flags.

Response fields

NameTypeRequiredDescription
okbooleanYesWhether consent was recorded.
consent_idstringNoStored consent record identifier.
request_idstringYesSupport identifier.

Examples

record-consent.sh
curl -X POST https://api.wavebird.ai/v1/consent \
  -H "Authorization: Bearer sk_test_wavebird_demo_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "client_id": "wbproj_demo_8jK42",
    "session_id": "sess_demo_123",
    "source": "publisher",
    "purposes": {
      "ads": true,
      "measurement": true
    }
  }'

Response example

{
  "ok": true,
  "consent_id": "consent_demo_123",
  "request_id": "req_b0Mf8h"
}

Errors

unauthorized401

Missing auth.

forbidden403

Publishable key origin is not allowed, or raw publishable-key auth was used instead of a browser activation token.

validation_error400

Consent purposes are missing or malformed.

Need rollout review?

Contact the team

Start in the dashboard, choose Script Tag or Server API, and use contact only when you need rollout review, enterprise coordination, or non-standard integration help. Billing beacon rules live in the API concepts guide.