ConsentStack · Schema

PostFunctionsV1ConsentRequest

CompanyConsent ManagementPrivacyGDPRCCPACookie

Properties

Name Type Description
site_key string Your public site key.
anon_id string A client-generated anonymous visitor ID (max 100 chars). Hashed server-side before storage.
categories object A map of category IDs to booleans representing the visitor's consent choices.
event_type string One of initial (first interaction), update (changed preferences), or impression (banner was shown).
event_action string The action taken: opt_in, opt_out, partial, or acknowledge.
config_version number The config version the visitor saw (for audit trail).
region string The resolved region ID at the time of consent.
consent_model string The active consent model: opt_in, opt_out, notice, or notice_required.
regulation string The regulation that applied (e.g. gdpr, us_state_laws).
time_to_action_ms number Milliseconds between banner display and visitor action.
interaction string How the visitor interacted (e.g. accept_all, reject_all, save_preferences).
preferences_opened boolean Whether the visitor opened the preferences panel before deciding.
banner_load_time_ms number Milliseconds the banner took to render.
banner_position string Banner layout position (e.g. bottom-full, center-modal).
page_url string The page URL where consent was given.
sdk_version string The SDK version that sent the request.
language string The visitor's browser language.
resolved_language string The language the banner was displayed in.
View JSON Schema on GitHub

JSON Schema

consentstack-io-post-functions-v1-consent-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/consentstack-io/json-schema/consentstack-io-post-functions-v1-consent-request-schema.json",
  "title": "PostFunctionsV1ConsentRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/consentstack-io-openapi-generated.yml#/components/schemas/PostFunctionsV1ConsentRequest",
  "type": "object",
  "properties": {
    "site_key": {
      "type": "string",
      "description": "Your public site key."
    },
    "anon_id": {
      "type": "string",
      "description": "A client-generated anonymous visitor ID (max 100 chars). Hashed server-side before storage."
    },
    "categories": {
      "type": "object",
      "description": "A map of category IDs to booleans representing the visitor's consent choices."
    },
    "event_type": {
      "type": "string",
      "description": "One of initial (first interaction), update (changed preferences), or impression (banner was shown)."
    },
    "event_action": {
      "type": "string",
      "description": "The action taken: opt_in, opt_out, partial, or acknowledge."
    },
    "config_version": {
      "type": "number",
      "description": "The config version the visitor saw (for audit trail)."
    },
    "region": {
      "type": "string",
      "description": "The resolved region ID at the time of consent."
    },
    "consent_model": {
      "type": "string",
      "description": "The active consent model: opt_in, opt_out, notice, or notice_required."
    },
    "regulation": {
      "type": "string",
      "description": "The regulation that applied (e.g. gdpr, us_state_laws)."
    },
    "time_to_action_ms": {
      "type": "number",
      "description": "Milliseconds between banner display and visitor action."
    },
    "interaction": {
      "type": "string",
      "description": "How the visitor interacted (e.g. accept_all, reject_all, save_preferences)."
    },
    "preferences_opened": {
      "type": "boolean",
      "description": "Whether the visitor opened the preferences panel before deciding."
    },
    "banner_load_time_ms": {
      "type": "number",
      "description": "Milliseconds the banner took to render."
    },
    "banner_position": {
      "type": "string",
      "description": "Banner layout position (e.g. bottom-full, center-modal)."
    },
    "page_url": {
      "type": "string",
      "description": "The page URL where consent was given."
    },
    "sdk_version": {
      "type": "string",
      "description": "The SDK version that sent the request."
    },
    "language": {
      "type": "string",
      "description": "The visitor's browser language."
    },
    "resolved_language": {
      "type": "string",
      "description": "The language the banner was displayed in."
    }
  },
  "required": [
    "site_key",
    "anon_id",
    "categories",
    "event_type"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/consentstack-io-post-functions-v1-consent-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.