Optimizely Consent API

The Consent API from Optimizely — 2 operation(s) for consent.

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/optimizely:optimizely-consent-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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.

OpenAPI Specification

optimizely-consent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Consent API
  description: Consent
  version: v3
servers:
- url: https://api.us1.odp.optimizely.com/v3
  description: United States
- url: https://api.eu1.odp.optimizely.com/v3
  description: Europe
- url: https://api.au1.odp.optimizely.com/v3
  description: Asia-Pacific
security:
- x-api-key: []
tags:
- name: Consent
paths:
  /consent:
    post:
      tags:
      - Consent
      summary: Update consent
      description: Updates marketing consent information for multiple customers.
      operationId: update-consent
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ConsentUpdateRequest'
            examples:
              Update consent request:
                description: Updates marketing consent information for multiple customers.
                value:
                - identifier_value: tyler@optimizely.com
                  identifier_field_name: email
                  consent: true
                  consent_update_reason: reason
                  consent_update_ts: ts
                - identifier_value: email
                  identifier_field_name: brian@optimizely.com
                  consent: false
                  consent_update_reason: reason
                  consent_update_ts: ts
        required: true
      responses:
        '202':
          description: Consent updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericUpdateResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":400,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"invalids":[{"field":"delimiter","reason":"Unrecognized delimiter, valid options are comma, tab or pipe"}]}}'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example: '{  "message": "Forbidden"}'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":404,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"message":"Not found description"}}'
  /consent/{identifier_field_name}:
    get:
      tags:
      - Consent
      summary: Get consent
      description: Get marketing consent information for a customer.
      operationId: get-consent
      parameters:
      - name: identifier_field_name
        in: path
        description: the name of the field that this identifier falls under, such as email
        required: true
        schema:
          type: string
          description: the name of the field that this identifier falls under, such as email
          example: email
        example: email
      - name: id
        in: query
        description: the valid messaging identifier you are requesting, such as an email address
        required: true
        schema:
          type: string
          description: the valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        example: example@example.com
      responses:
        '200':
          description: Consent information found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentGetResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":400,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"invalids":[{"field":"delimiter","reason":"Unrecognized delimiter, valid options are comma, tab or pipe"}]}}'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                example: '{  "message": "Forbidden"}'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                example: '{"title":"Bad Request","status":404,"timestamp":"2018-09-10T21:07:10-05:00","detail":{"message":"Not found description"}}'
components:
  schemas:
    ConsentUpdateRequest:
      required:
      - consent
      - identifier_field_name
      - identifier_value
      type: object
      properties:
        identifier_field_name:
          type: string
          description: The name of the field that this identifier falls under, such as email
          example: email
        identifier_value:
          type: string
          description: The valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        consent:
          type: boolean
          description: true/false indicator of whether a customer has provided consent to receive marketing messages on this identifier
          example: true
        consent_update_reason:
          type: string
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
        consent_update_ts:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
        event_data:
          type: object
          additionalProperties:
            type: object
            description: (optional) object of key/value pairs, which are added to the generated events
            writeOnly: true
          description: (optional) object of key/value pairs, which are added to the generated events
          writeOnly: true
    ConsentGetResponse:
      required:
      - consent
      - identifier_field_name
      - identifier_value
      type: object
      properties:
        identifier_field_name:
          type: string
          description: The name of the field that this identifier falls under, such as email
          example: email
        identifier_value:
          type: string
          description: The valid messaging identifier you are requesting, such as an email address
          example: example@example.com
        consent:
          type: boolean
          description: true/false indicator of whether a customer has provided consent to receive marketing messages on this identifier
          example: true
        consent_update_reason:
          type: string
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
        consent_update_ts:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
        zaius_id:
          type: integer
          description: (optional) a reason for updating consent; can be any text value, for audit purposes
          format: int64
          readOnly: true
        event_data:
          type: object
          additionalProperties:
            type: object
            description: (optional) object of key/value pairs, which are added to the generated events
            writeOnly: true
          description: (optional) object of key/value pairs, which are added to the generated events
          writeOnly: true
    GenericUpdateResponse:
      type: object
      properties:
        title:
          type: string
        status:
          type: integer
          format: int32
        timestamp:
          type: string
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
x-readme:
  explorer-enabled: true
  proxy-enabled: true