{
    "openapi": "3.1.0",
    "info": {
        "title": "Allegro Browser SDK API",
        "version": "0.0.1",
        "description": "Endpoints used by the Allegro Browser SDK."
    },
    "servers": [
        {
            "url": "https://{tenant}.allegrocdp.com/api",
            "variables": {
                "tenant": {
                    "default": "example",
                    "description": "The tenant slug."
                }
            }
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "/entitlements": {
            "get": {
                "operationId": "audienceEntitlement.index",
                "description": "List all active entitlements for the authenticated audience member.",
                "summary": "List Active Entitlements",
                "tags": [
                    "AudienceEntitlement"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "audienceMember",
                                    "audienceMember.externalProfiles",
                                    "audienceMember.sessions",
                                    "audienceMember.sessions.audienceMember",
                                    "product"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[entitlements]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "id",
                                    "product",
                                    "started_at",
                                    "ended_at",
                                    "revoked_at",
                                    "note",
                                    "status",
                                    "is_active",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audience_members]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "email",
                                    "email_verified",
                                    "meta",
                                    "entitlements",
                                    "purchases",
                                    "properties",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audience_device_sessions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "is_authenticated",
                                    "authenticated_at",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[products]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "name",
                                    "slug",
                                    "description",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `EntitlementResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/EntitlementResource"
                                            }
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "$ref": "#/components/schemas/AudienceMemberResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AudienceMemberExternalProfileResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/AudienceDeviceSessionResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/JsonApiResource"
                                                    },
                                                    {
                                                        "$ref": "#/components/schemas/ProductResource"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/entitlements/{slug}": {
            "get": {
                "operationId": "audienceEntitlement.check",
                "description": "Check whether the authenticated member has an active entitlement for the given product slug.",
                "summary": "Entitlement Check",
                "tags": [
                    "AudienceEntitlement"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "access": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "access"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "access": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "access"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/external-profiles/{provider}": {
            "get": {
                "operationId": "audienceExternalProfile.show",
                "summary": "Get a single external profile for the authenticated audience member by provider",
                "tags": [
                    "AudienceExternalProfile"
                ],
                "parameters": [
                    {
                        "name": "provider",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AudienceMemberExternalProfileResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AudienceMemberExternalProfileResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/checkout": {
            "post": {
                "operationId": "checkout.initiate",
                "description": "Creates a hosted checkout session for a term and returns the provider URL.\nJWT is optional \u2014 authenticated members get their details pre-filled.\nReturns a 422 with code CHECKOUT_UNAVAILABLE when the tenant has no payment\nprovider capable of checkout active.",
                "summary": "Initiate Checkout",
                "tags": [
                    "Checkout"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/CheckoutInitiateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "checkout_url": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "checkout_url"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/checkout/token/exchange": {
            "post": {
                "operationId": "checkoutToken.exchange",
                "description": "Exchange a one-time allegro_purchase_token for a JWT and entitlement data.\nThe token works once and expires 10 minutes after checkout returns. The JWT is for the purchase's device session,\nor a new unauthenticated session when the buyer checked out as a guest.",
                "summary": "Exchange Purchase Token",
                "tags": [
                    "CheckoutToken"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "token": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jwt": {
                                            "type": "string"
                                        },
                                        "entitlement": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "product": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "slug",
                                                        "name"
                                                    ]
                                                },
                                                "started_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ended_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "is_active": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "product",
                                                "started_at",
                                                "ended_at",
                                                "is_active"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "jwt",
                                        "entitlement"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/event": {
            "post": {
                "operationId": "event.create",
                "description": "Record a new event with the provided request data.",
                "summary": "Create Event",
                "tags": [
                    "Event"
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "event_id"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms/by-slug/{slug}": {
            "get": {
                "operationId": "form.showBySlug",
                "description": "Fetch a form definition by its slug for rendering in the browser. Fields\nare resolved against the tenant's user attributes: each field carries its\neffective label plus the attribute's type, options, and validation rules.\nFields whose attribute no longer exists or is no longer user-editable are\nomitted.",
                "summary": "Get Form",
                "tags": [
                    "Form"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The form slug.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "title": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "submit_text": {
                                                    "type": "string"
                                                },
                                                "fields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "attribute_slug": {
                                                                "type": "string"
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "placeholder": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "tooltip": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "required": {
                                                                "type": "boolean"
                                                            },
                                                            "conditions": {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            "type": {
                                                                "type": "string"
                                                            },
                                                            "options": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "description": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "validation_rules": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            }
                                                        },
                                                        "required": [
                                                            "attribute_slug",
                                                            "label",
                                                            "placeholder",
                                                            "tooltip",
                                                            "required",
                                                            "conditions",
                                                            "type",
                                                            "options",
                                                            "description",
                                                            "validation_rules"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "title",
                                                "slug",
                                                "submit_text",
                                                "fields"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/forms/by-slug/{slug}/submissions": {
            "post": {
                "operationId": "form.submit",
                "description": "Submit values for a form on behalf of the authenticated audience member.\nOnly fields whose display conditions are currently met are validated and\nwritten: required fields must be present, and each value must pass the\nattribute's type and configured validation rules. A `null` value clears\nthe member's stored value. Returns the updated values for the form's\nfields and a refreshed JWT.",
                "summary": "Submit Form",
                "tags": [
                    "Form"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The form slug.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "values": {
                                        "type": "object",
                                        "description": "Submitted values keyed by attribute slug."
                                    }
                                },
                                "required": [
                                    "values"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "values": {
                                            "type": "string"
                                        },
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "values",
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/heartbeat": {
            "post": {
                "operationId": "allegro.heartbeat",
                "description": "Push the page_view event id onto the tenant's Redis FIFO list with a\nserver timestamp and the cumulative active time on the page. The event id\nis trusted (UUID format only \u2014 no lookup). Each beat carries the running\ntotal of active whole seconds, so the latest beat for an event id supersedes\nearlier ones. No-op (204, before validation) when the SdkHeartbeat feature\nis disabled, so the endpoint is unobservable while off.",
                "summary": "Record Heartbeat",
                "tags": [
                    "Heartbeat"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "event_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "active_seconds": {
                                        "type": "integer",
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "event_id",
                                    "active_seconds"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/authentication/identify": {
            "post": {
                "operationId": "authentication.identifySession",
                "description": "Create or retrieve an audience device session for the given email and device ID.\nIf the audience member does not exist, they will be created. Always returns an\nunauthenticated session JWT, even if the device was previously authenticated.\nA device already identified as a different member is moved to the member for\nthe given email.\n\nOptional `attributes` are stored against the member, keyed by user attribute\nslug. Because identify is unauthenticated, a value is only written when the\nmember has no value for that attribute yet; existing values are never\noverwritten. Every slug must be a defined, member-editable attribute and every\nvalue must pass its type and rules, or the request fails before the member is\ncreated: a 404 `USER_ATTRIBUTE_NOT_FOUND`, a 403 `USER_ATTRIBUTE_NOT_EDITABLE`,\nor a 422 with errors keyed `attributes.<slug>`.",
                "summary": "Identify Session",
                "tags": [
                    "IdentifySession"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "data": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "attributes": {
                                        "type": "object",
                                        "description": "User attribute values keyed by slug, stored only where the member has no value yet."
                                    }
                                },
                                "required": [
                                    "email",
                                    "device_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/interactions/{id}": {
            "get": {
                "operationId": "interaction.show",
                "description": "Retrieve a single interaction by its ID or slug. Published interactions are\npublicly accessible; unpublished interactions require authorization.",
                "summary": "Get Interaction",
                "tags": [
                    "Interaction"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`InteractionResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/InteractionResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "$ref": "#/components/responses/AuthorizationException"
                    }
                }
            }
        },
        "/interactions/evaluate": {
            "post": {
                "operationId": "allegro.interactionEvaluate",
                "tags": [
                    "InteractionEvaluate"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EvaluateInteractionsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "matches": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "meters": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "experiments": {
                                                    "type": "object",
                                                    "additionalProperties": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "matches",
                                                "meters",
                                                "experiments"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "matches": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                }
                                            },
                                            "required": [
                                                "matches"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/interactions/evaluate-debug": {
            "post": {
                "operationId": "allegro.interactionEvaluateDebug",
                "tags": [
                    "InteractionEvaluateDebug"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/EvaluateDebugInteractionsRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "matches": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meters": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "debug": {
                                            "type": "object",
                                            "properties": {
                                                "request": {
                                                    "type": "object",
                                                    "properties": {
                                                        "request": {
                                                            "type": "object",
                                                            "properties": {
                                                                "url": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "path": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "query": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "string"
                                                                            },
                                                                            "minItems": 0,
                                                                            "maxItems": 0,
                                                                            "additionalItems": false
                                                                        }
                                                                    ]
                                                                },
                                                                "referrer": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "content_type": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "section": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "tags": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "string"
                                                                            },
                                                                            "minItems": 0,
                                                                            "maxItems": 0,
                                                                            "additionalItems": false
                                                                        }
                                                                    ]
                                                                },
                                                                "authors": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "string"
                                                                            },
                                                                            "minItems": 0,
                                                                            "maxItems": 0,
                                                                            "additionalItems": false
                                                                        }
                                                                    ]
                                                                },
                                                                "published_at": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "custom": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "string"
                                                                            },
                                                                            "minItems": 0,
                                                                            "maxItems": 0,
                                                                            "additionalItems": false
                                                                        }
                                                                    ]
                                                                },
                                                                "cookies": {
                                                                    "anyOf": [
                                                                        {
                                                                            "type": "string"
                                                                        },
                                                                        {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "string"
                                                                            },
                                                                            "minItems": 0,
                                                                            "maxItems": 0,
                                                                            "additionalItems": false
                                                                        }
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "url",
                                                                "path",
                                                                "query",
                                                                "referrer",
                                                                "content_type",
                                                                "section",
                                                                "tags",
                                                                "authors",
                                                                "published_at",
                                                                "custom",
                                                                "cookies"
                                                            ]
                                                        },
                                                        "property": {
                                                            "type": "object",
                                                            "properties": {
                                                                "slug": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "slug"
                                                            ]
                                                        },
                                                        "device": {
                                                            "type": "object",
                                                            "properties": {
                                                                "browser": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "os": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "type": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "user_agent": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "browser",
                                                                "os",
                                                                "type",
                                                                "user_agent"
                                                            ]
                                                        },
                                                        "geo": {
                                                            "type": "object",
                                                            "properties": {
                                                                "country": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "region": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "city": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "postal_code": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "country_resolved": {
                                                                    "type": "boolean"
                                                                },
                                                                "region_resolved": {
                                                                    "type": "boolean"
                                                                },
                                                                "city_resolved": {
                                                                    "type": "boolean"
                                                                },
                                                                "postal_code_resolved": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "country",
                                                                "region",
                                                                "city",
                                                                "postal_code",
                                                                "country_resolved",
                                                                "region_resolved",
                                                                "city_resolved",
                                                                "postal_code_resolved"
                                                            ]
                                                        },
                                                        "time": {
                                                            "type": "object",
                                                            "properties": {
                                                                "org_timezone": {
                                                                    "type": "string"
                                                                },
                                                                "org_now": {
                                                                    "type": "string"
                                                                },
                                                                "org_day_of_week": {
                                                                    "type": "string"
                                                                },
                                                                "visitor_timezone": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "visitor_now": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "visitor_day_of_week": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "visitor_time_reason": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ],
                                                                    "enum": [
                                                                        "no timezone in SDK payload",
                                                                        "unresolvable timezone",
                                                                        null
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "org_timezone",
                                                                "org_now",
                                                                "org_day_of_week",
                                                                "visitor_timezone",
                                                                "visitor_now",
                                                                "visitor_day_of_week",
                                                                "visitor_time_reason"
                                                            ]
                                                        },
                                                        "session": {
                                                            "type": "object",
                                                            "properties": {
                                                                "identified": {
                                                                    "type": "boolean"
                                                                },
                                                                "authenticated": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "identified",
                                                                "authenticated"
                                                            ]
                                                        },
                                                        "member": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "id"
                                                            ]
                                                        },
                                                        "profile": {
                                                            "type": "object",
                                                            "properties": {
                                                                "status": {
                                                                    "type": "string",
                                                                    "const": "anonymous"
                                                                },
                                                                "values": {
                                                                    "type": "null"
                                                                }
                                                            },
                                                            "required": [
                                                                "status",
                                                                "values"
                                                            ]
                                                        },
                                                        "entitlements": {
                                                            "type": [
                                                                "array",
                                                                "null"
                                                            ],
                                                            "items": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "meters": {
                                                            "type": "object",
                                                            "additionalProperties": {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                            }
                                                        },
                                                        "experiments": {
                                                            "type": [
                                                                "array",
                                                                "null"
                                                            ],
                                                            "items": {
                                                                "type": "string"
                                                            },
                                                            "minItems": 0,
                                                            "maxItems": 0,
                                                            "additionalItems": false
                                                        }
                                                    },
                                                    "required": [
                                                        "request",
                                                        "property",
                                                        "device",
                                                        "geo",
                                                        "time",
                                                        "session",
                                                        "member",
                                                        "profile",
                                                        "entitlements",
                                                        "meters",
                                                        "experiments"
                                                    ]
                                                },
                                                "interactions": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "frequency_caps": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    },
                                                    "minItems": 0,
                                                    "maxItems": 0,
                                                    "additionalItems": false
                                                },
                                                "conflicts": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "interaction": {
                                                                "type": "string"
                                                            },
                                                            "hidden_by": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "interaction",
                                                            "hidden_by"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "request",
                                                "interactions",
                                                "frequency_caps",
                                                "conflicts"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "matches",
                                        "meters",
                                        "debug"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/authentication/magic-link/request": {
            "post": {
                "operationId": "magicLink.request",
                "description": "Send a magic link email to the provided address for passwordless authentication.\nCreates the audience member if they do not already exist. Rate limited to 3\nrequests per email per minute.\n\nWhen `registration.form` names a form and the email has no account yet, nothing is\ncreated or sent: the response is `registration_required` with that form. Sending the\nform's answers in `registration.values` creates the account with them and continues.",
                "summary": "Request Magic Link",
                "tags": [
                    "MagicLink"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "return_url": {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    "data": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "registration": {
                                        "type": "object",
                                        "properties": {
                                            "form": {
                                                "type": "string"
                                            },
                                            "values": {
                                                "type": [
                                                    "array",
                                                    "null"
                                                ],
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "email",
                                    "device_id",
                                    "return_url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "jwt": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "const": "ok"
                                                }
                                            },
                                            "required": [
                                                "created",
                                                "jwt",
                                                "status"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "registration_required"
                                                },
                                                "form": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "title": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "submit_text": {
                                                            "type": "string"
                                                        },
                                                        "fields": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "attribute_slug": {
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "placeholder": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "tooltip": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "required": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "conditions": {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "options": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "description": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "validation_rules": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {}
                                                                    }
                                                                },
                                                                "required": [
                                                                    "attribute_slug",
                                                                    "label",
                                                                    "placeholder",
                                                                    "tooltip",
                                                                    "required",
                                                                    "conditions",
                                                                    "type",
                                                                    "options",
                                                                    "description",
                                                                    "validation_rules"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "title",
                                                        "slug",
                                                        "submit_text",
                                                        "fields"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "form"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/authentication/magic-link/validate": {
            "post": {
                "operationId": "magicLink.validate",
                "description": "Validate a magic link token and authenticate the device session. Only the\ndevice that opens the link is authenticated. The audience member's email is\nmarked as verified upon success.",
                "summary": "Validate Magic Link",
                "tags": [
                    "MagicLink"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "token": {
                                        "type": "string"
                                    },
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    }
                                },
                                "required": [
                                    "token",
                                    "device_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Authentication successful."
                                        },
                                        "jwt": {
                                            "type": "string"
                                        },
                                        "return_url": {
                                            "type": "string"
                                        },
                                        "audience_member_created": {
                                            "type": "string"
                                        },
                                        "sessions_authenticated": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string"
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1,
                                            "additionalItems": false
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "jwt",
                                        "return_url",
                                        "audience_member_created",
                                        "sessions_authenticated"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/authentication/magic-link-otp/request": {
            "post": {
                "operationId": "magicLinkOtp.request",
                "description": "Sends a single email containing both a magic sign-in link and a six-digit\none-time code. The reader can click the link (in any browser) or enter the\ncode on this device. Creates the audience member if they do not already\nexist. Rate limited to 3 requests per email per minute. Both the link and\nthe code expire in 30 minutes. Issuing a new request invalidates any prior\ncode for the session.\n\nWhen `registration.form` names a form and the email has no account yet, nothing is\ncreated or sent: the response is `registration_required` with that form. Sending the\nform's answers in `registration.values` creates the account with them and continues.",
                "summary": "Request a combined magic link and one-time code",
                "tags": [
                    "MagicLinkOtp"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "return_url": {
                                        "type": "string",
                                        "format": "uri"
                                    },
                                    "data": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "registration": {
                                        "type": "object",
                                        "properties": {
                                            "form": {
                                                "type": "string"
                                            },
                                            "values": {
                                                "type": [
                                                    "array",
                                                    "null"
                                                ],
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "email",
                                    "device_id",
                                    "return_url"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "jwt": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "const": "ok"
                                                }
                                            },
                                            "required": [
                                                "created",
                                                "jwt",
                                                "status"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "registration_required"
                                                },
                                                "form": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "title": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "submit_text": {
                                                            "type": "string"
                                                        },
                                                        "fields": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "attribute_slug": {
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "placeholder": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "tooltip": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "required": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "conditions": {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "options": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "description": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "validation_rules": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {}
                                                                    }
                                                                },
                                                                "required": [
                                                                    "attribute_slug",
                                                                    "label",
                                                                    "placeholder",
                                                                    "tooltip",
                                                                    "required",
                                                                    "conditions",
                                                                    "type",
                                                                    "options",
                                                                    "description",
                                                                    "validation_rules"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "title",
                                                        "slug",
                                                        "submit_text",
                                                        "fields"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "form"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/authentication/otp/request": {
            "post": {
                "operationId": "otp.request",
                "description": "Email a six-digit one-time passcode for passwordless authentication.\nCreates the audience member if they do not already exist. Rate limited to\n3 requests per email per minute. Issuing a new code invalidates any prior\ncode for the session.\n\nWhen `registration.form` names a form and the email has no account yet, nothing is\ncreated or sent: the response is `registration_required` with that form. Sending the\nform's answers in `registration.values` creates the account with them and continues.",
                "summary": "Request OTP",
                "tags": [
                    "Otp"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "return_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri"
                                    },
                                    "data": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "registration": {
                                        "type": "object",
                                        "properties": {
                                            "form": {
                                                "type": "string"
                                            },
                                            "values": {
                                                "type": [
                                                    "array",
                                                    "null"
                                                ],
                                                "items": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "email",
                                    "device_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "jwt": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string",
                                                    "const": "ok"
                                                }
                                            },
                                            "required": [
                                                "created",
                                                "jwt",
                                                "status"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "registration_required"
                                                },
                                                "form": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "title": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "submit_text": {
                                                            "type": "string"
                                                        },
                                                        "fields": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "attribute_slug": {
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "type": "string"
                                                                    },
                                                                    "placeholder": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "tooltip": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "required": {
                                                                        "type": "boolean"
                                                                    },
                                                                    "conditions": {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    "type": {
                                                                        "type": "string"
                                                                    },
                                                                    "options": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    },
                                                                    "description": {
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "validation_rules": {
                                                                        "type": [
                                                                            "array",
                                                                            "null"
                                                                        ],
                                                                        "items": {}
                                                                    }
                                                                },
                                                                "required": [
                                                                    "attribute_slug",
                                                                    "label",
                                                                    "placeholder",
                                                                    "tooltip",
                                                                    "required",
                                                                    "conditions",
                                                                    "type",
                                                                    "options",
                                                                    "description",
                                                                    "validation_rules"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "title",
                                                        "slug",
                                                        "submit_text",
                                                        "fields"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "form"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/authentication/otp/validate": {
            "post": {
                "operationId": "otp.validate",
                "description": "Validate a six-digit code against the latest unexpired code for the\nrequesting device session and authenticate that session synchronously.",
                "summary": "Validate OTP",
                "tags": [
                    "Otp"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "device_id": {
                                        "type": "string",
                                        "format": "uuid"
                                    },
                                    "code": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "device_id",
                                    "code"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Authentication successful."
                                        },
                                        "jwt": {
                                            "type": "string"
                                        },
                                        "return_url": {
                                            "type": "string"
                                        },
                                        "audience_member_created": {
                                            "type": "string"
                                        },
                                        "sessions_authenticated": {
                                            "type": "array",
                                            "prefixItems": [
                                                {
                                                    "type": "string"
                                                }
                                            ],
                                            "minItems": 1,
                                            "maxItems": 1,
                                            "additionalItems": false
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "jwt",
                                        "return_url",
                                        "audience_member_created",
                                        "sessions_authenticated"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/recommendations": {
            "get": {
                "operationId": "recommendation.index",
                "description": "Ranked article recommendations for the reader's device, from the\ntenant's configured engine. Answers an empty set rather than an error\nwhen the engine is unreachable: a reader cannot act on the difference,\nand a dead widget is a visible defect where an empty one is not.",
                "summary": "Get Recommendations",
                "tags": [
                    "Recommendation"
                ],
                "parameters": [
                    {
                        "name": "device",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "path",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 2048
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 24
                        }
                    },
                    {
                        "name": "max_age_days",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 0,
                            "maximum": 3650
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "request_id": {
                                            "type": "null"
                                        },
                                        "took_ms": {
                                            "type": "number"
                                        },
                                        "items": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "request_id",
                                        "took_ms",
                                        "items"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/recommendations/click": {
            "post": {
                "operationId": "recommendation.click",
                "description": "Reports that the reader clicked one served recommendation, keyed to the\n`request_id` the serving call returned. Always answers 204: the reader\nis navigating away and has no recourse, so a failed report is logged\nrather than surfaced.",
                "summary": "Record Recommendation Click",
                "tags": [
                    "Recommendation"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "request_id": {
                                        "type": "string",
                                        "maxLength": 64
                                    },
                                    "path": {
                                        "type": "string",
                                        "maxLength": 2048
                                    },
                                    "device": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uuid"
                                    },
                                    "source_path": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 2048
                                    },
                                    "strategy": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 32
                                    },
                                    "position": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 100
                                    }
                                },
                                "required": [
                                    "request_id",
                                    "path"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/authentication/session": {
            "get": {
                "operationId": "session.get",
                "description": "Retrieve the current authenticated device session details.",
                "summary": "Get Session",
                "tags": [
                    "Session"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "audienceMember"
                                ]
                            }
                        },
                        "explode": false
                    },
                    {
                        "name": "fields[audience_device_sessions]",
                        "in": "query",
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string",
                                "enum": [
                                    "is_authenticated",
                                    "authenticated_at",
                                    "created_at",
                                    "updated_at"
                                ]
                            }
                        },
                        "explode": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`AudienceDeviceSessionResource`",
                        "content": {
                            "application/vnd.api+json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/AudienceDeviceSessionResource"
                                        },
                                        "included": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/JsonApiResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "session.destroy",
                "description": "Log out and delete the current device session. A `logout` event\nis recorded before the session is removed.",
                "summary": "Destroy Session",
                "tags": [
                    "Session"
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    }
                }
            }
        },
        "/authentication/session/refresh": {
            "post": {
                "operationId": "session.refresh",
                "description": "Generate a new JWT for the current device session.",
                "summary": "Refresh Session Token",
                "tags": [
                    "Session"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/profile": {
            "patch": {
                "operationId": "sessionProfile.update",
                "description": "Update the authenticated audience member's own record. Fields the request\nomits are left as they are, so a caller can send only what changed. Only\n`name` is writable; the member's email is changed through its own\nverification flow. A refreshed JWT carrying the updated `audience_member`\nclaim is returned.",
                "summary": "Update Profile",
                "tags": [
                    "SessionProfile"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/UpdateSessionProfileRequest"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "name": {
                                                "type": "string",
                                                "description": "The name to store on the member record."
                                            }
                                        }
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "name": {
                                            "type": "string"
                                        },
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "name",
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                }
            }
        },
        "/user-attributes": {
            "get": {
                "operationId": "sessionUserAttribute.index",
                "description": "List every user attribute defined for the tenant along with the authenticated\naudience member's value for it. Attributes the member has never been given a\nvalue for are returned with a `null` value. Private attributes are omitted.",
                "summary": "List User Attributes",
                "tags": [
                    "SessionUserAttribute"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `UserAttributeResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/UserAttributeResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "sessionUserAttribute.setMany",
                "description": "Set the values of several user attributes for the authenticated audience member\nin one request, keyed by attribute slug. A `null` value clears the member's stored\nvalue for that attribute. Every slug is resolved and every value validated against\nits attribute's type and configured rules before anything is written, so the whole\nrequest fails without saving if one entry is bad: a 404 `USER_ATTRIBUTE_NOT_FOUND`\nerror listing the unknown slugs, a 403 `USER_ATTRIBUTE_NOT_EDITABLE` error listing\nthe slugs the member may not edit, or a 422 with errors keyed `values.<slug>`. A\nrefreshed JWT containing the updated attribute claims is returned.",
                "summary": "Set User Attributes",
                "tags": [
                    "SessionUserAttribute"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "values": {
                                        "type": "object",
                                        "description": "The values to store keyed by attribute slug, each matching its attribute type, or null to clear it."
                                    }
                                },
                                "required": [
                                    "values"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "values": {
                                            "type": "object",
                                            "additionalProperties": {}
                                        },
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "values",
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/user-attributes/{slug}": {
            "put": {
                "operationId": "sessionUserAttribute.set",
                "description": "Set the value of a single user attribute for the authenticated audience member.\nThe value is validated against the attribute's type: `string` accepts any string,\n`number` accepts any numeric value, `boolean` accepts a boolean, and `enum`\naccepts one of the attribute's configured options. A refreshed JWT containing the\nupdated attribute claims is returned. Returns a 403 `USER_ATTRIBUTE_NOT_EDITABLE` error\nif the attribute is not editable by the member, or a 404 `USER_ATTRIBUTE_NOT_FOUND`\nerror if it is not defined or is private.",
                "summary": "Set User Attribute",
                "tags": [
                    "SessionUserAttribute"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The user attribute slug.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "description": "The value to store, matching the attribute type.",
                                        "anyOf": [
                                            {
                                                "type": "string"
                                            },
                                            {
                                                "type": "number"
                                            },
                                            {
                                                "type": "boolean"
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "slug": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "number"
                                                },
                                                {
                                                    "type": "integer"
                                                },
                                                {
                                                    "type": "null"
                                                },
                                                {
                                                    "type": "object"
                                                }
                                            ]
                                        },
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "slug",
                                        "value",
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "sessionUserAttribute.delete",
                "description": "Clear the authenticated audience member's stored value for a user attribute. The\nattribute itself remains defined for the tenant and will continue to be returned\nwith a `null` value. A refreshed JWT is returned. Returns a 403\n`USER_ATTRIBUTE_NOT_EDITABLE` error if the attribute is not editable by the member,\nor a 404 `USER_ATTRIBUTE_NOT_FOUND` error if it is not defined or is private.",
                "summary": "Delete User Attribute",
                "tags": [
                    "SessionUserAttribute"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "description": "The user attribute slug.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jwt": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "jwt"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/authentication/third-party/exchange": {
            "post": {
                "operationId": "socialLogin.exchange",
                "description": "Exchange the one-time `allegro_social_code` a redirect-based social login appends to\nthe returning page for the member's JWT. Each code works once, expires after five\nminutes, and only for the device that started the login.",
                "summary": "Exchange Social Login Code",
                "tags": [
                    "SocialLogin"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string"
                                    },
                                    "device_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                },
                                "required": [
                                    "code"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "jwt": {
                                            "type": "string"
                                        },
                                        "session_id": {
                                            "type": "string"
                                        },
                                        "created": {
                                            "type": "string"
                                        },
                                        "provider": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "jwt",
                                        "session_id",
                                        "created",
                                        "provider"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#/components/responses/ValidationException"
                    }
                },
                "security": []
            }
        },
        "/templates/by-slug/{slug}": {
            "get": {
                "operationId": "template.showBySlug",
                "description": "Used by the SDK to resolve `<allegro-template ref=\"...\">` children.",
                "summary": "Get a published template by its slug",
                "tags": [
                    "Template"
                ],
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`TemplateResource`",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/TemplateResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/webhooks/fundraiseup": {
            "post": {
                "operationId": "fundraiseup.webhook",
                "summary": "Verifies a Fundraise Up delivery against the connection the request host resolves to and queues it for\nprocessing by its identifiers only. Returns 404 without a connection, 400 (with an error log line) without a\nsigning secret, for a bad signature, or for a body without an id, type and data.object.id, and 200\notherwise; ping and test events, and events from the mode the connection is not in, are logged and not queued",
                "tags": [
                    "Webhook"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "received": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "received"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Invalid event."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "Invalid signature."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "string",
                                                    "const": "No signing secret is configured."
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#/components/responses/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        },
        "schemas": {
            "AudienceDeviceSessionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "const": "audience_device_sessions"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "is_authenticated": {
                                "type": "string"
                            },
                            "authenticated_at": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "audienceMember": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "AudienceDeviceSessionResource"
            },
            "AudienceMemberExternalProfileResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "audience_member_external_profiles"
                    },
                    "meta": {
                        "type": "object",
                        "properties": {
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "created_at",
                            "updated_at"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "meta"
                ],
                "title": "AudienceMemberExternalProfileResource"
            },
            "AudienceMemberResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "const": "audience_members"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "email_verified": {
                                "type": "boolean"
                            },
                            "meta": {
                                "type": "object",
                                "additionalProperties": {}
                            },
                            "entitlements": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/EntitlementResource"
                                }
                            },
                            "purchases": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/PurchaseResource"
                                }
                            },
                            "properties": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "slug": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "joined_at": {
                                            "type": "string",
                                            "format": "date-time"
                                        },
                                        "signed_up": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "slug",
                                        "name",
                                        "joined_at",
                                        "signed_up"
                                    ]
                                }
                            },
                            "created_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": "string",
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "externalProfiles": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "const": "audience_member_external_profiles"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "sessions": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string",
                                                    "const": "audience_device_sessions"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "AudienceMemberResource"
            },
            "CheckoutInitiateRequest": {
                "type": "object",
                "properties": {
                    "plan_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "return_url": {
                        "type": "string",
                        "format": "uri"
                    }
                },
                "required": [
                    "plan_id",
                    "return_url"
                ],
                "title": "CheckoutInitiateRequest"
            },
            "EntitlementResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "type": {
                        "type": "string",
                        "const": "entitlements"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "product": {
                                "$ref": "#/components/schemas/ProductResource"
                            },
                            "started_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "ended_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "revoked_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "note": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "status": {
                                "$ref": "#/components/schemas/EntitlementStatus"
                            },
                            "is_active": {
                                "type": "boolean"
                            },
                            "created_at": {
                                "type": "string",
                                "format": "date-time"
                            },
                            "updated_at": {
                                "type": "string",
                                "format": "date-time"
                            }
                        }
                    },
                    "relationships": {
                        "type": "object",
                        "properties": {
                            "audienceMember": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string",
                                                "format": "uuid"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "audience_members"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            },
                            "product": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "type": {
                                                "type": "string",
                                                "const": "products"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "type"
                                        ]
                                    }
                                },
                                "required": [
                                    "data"
                                ]
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "EntitlementResource"
            },
            "EntitlementStatus": {
                "type": "string",
                "description": "The lifecycle state of an entitlement, derived from its timestamps. `Revoked` is distinct from `Expired`: both deny access, but a revoked entitlement was ended deliberately by an admin, a refund, or a sync, while an expired one simply reached the end date it was granted with.\n",
                "enum": [
                    "scheduled",
                    "active",
                    "revoked",
                    "expired"
                ],
                "title": "EntitlementStatus"
            },
            "EvaluateDebugInteractionsRequest": {
                "type": "object",
                "description": "The debug variant of the evaluate payload: identical SDK fields plus the\nsigned workbench token. Token *verification* stays in the controller so\nan invalid token is a bare 403, never a helpful validation message.",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "path": {
                        "type": "string",
                        "maxLength": 2048
                    },
                    "query": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 100
                    },
                    "referrer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "content_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "section": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "timezone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "custom": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 50
                    },
                    "cookies": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 50
                    },
                    "device_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "session_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "content_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "tags": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "authors": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "debug_token": {
                        "type": "string"
                    }
                },
                "required": [
                    "url",
                    "path",
                    "debug_token"
                ],
                "title": "EvaluateDebugInteractionsRequest"
            },
            "EvaluateInteractionsRequest": {
                "type": "object",
                "description": "Validates the SDK's `POST /interactions/evaluate` payload (spec \u00a74).\n\nThe endpoint is public \u2014 anonymous visitors are evaluated too \u2014 so\n`authorize()` always passes and does zero DB work: the SDK attaches a\ndevice-session bearer token to effectively every request (anonymous\nvisitors carry one too), so resolving it here would defeat the hottest\npath's cache-read-only budget before the controller even gets a chance to\ntake the empty-snapshot fast path. See {@see resolveAudienceMemberId()}.",
                "properties": {
                    "url": {
                        "type": "string",
                        "format": "uri",
                        "maxLength": 2048
                    },
                    "path": {
                        "type": "string",
                        "maxLength": 2048
                    },
                    "query": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 100
                    },
                    "referrer": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "content_type": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "section": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "timezone": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "custom": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 50
                    },
                    "cookies": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        },
                        "maxItems": 50
                    },
                    "device_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "session_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 128
                    },
                    "content_id": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 2048
                    },
                    "tags": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "authors": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "published_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "url",
                    "path"
                ],
                "title": "EvaluateInteractionsRequest"
            },
            "InteractionResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "actions": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "id",
                    "title",
                    "slug",
                    "actions"
                ],
                "title": "InteractionResource"
            },
            "JsonApiResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "JsonApiResource"
            },
            "PlanResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "product_id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "price": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "formatted_price": {
                        "type": "string"
                    },
                    "duration_amount": {
                        "type": "string"
                    },
                    "duration_unit": {
                        "type": "string"
                    },
                    "is_unlimited": {
                        "type": "string"
                    },
                    "custom_fields": {
                        "type": "string"
                    },
                    "duration_label": {
                        "type": "string"
                    },
                    "product": {
                        "$ref": "#/components/schemas/ProductResource"
                    },
                    "created_at": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "product_id",
                    "name",
                    "description",
                    "price",
                    "currency",
                    "formatted_price",
                    "duration_amount",
                    "duration_unit",
                    "is_unlimited",
                    "custom_fields",
                    "duration_label",
                    "created_at",
                    "updated_at"
                ],
                "title": "PlanResource"
            },
            "ProductResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string",
                        "const": "products"
                    },
                    "attributes": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "slug": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "created_at": {
                                "type": "string"
                            },
                            "updated_at": {
                                "type": "string"
                            }
                        }
                    }
                },
                "required": [
                    "id",
                    "type"
                ],
                "title": "ProductResource"
            },
            "PurchaseResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "$ref": "#/components/schemas/PurchaseStatus"
                    },
                    "status_label": {
                        "type": "string"
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "formatted_amount": {
                        "type": "string"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "provider": {
                        "type": "string"
                    },
                    "provider_session_id": {
                        "type": "string"
                    },
                    "provider_payment_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "provider_refund_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "has_active_entitlement": {
                        "type": "boolean"
                    },
                    "plan": {
                        "anyOf": [
                            {
                                "$ref": "#/components/schemas/PlanResource"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "audience_member": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "display_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "id",
                            "email",
                            "name",
                            "display_name"
                        ]
                    },
                    "activities": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "integer"
                                },
                                "event": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "description": {
                                    "type": "string"
                                },
                                "causer_name": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "properties": {
                                    "type": "object",
                                    "additionalProperties": {}
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            },
                            "required": [
                                "id",
                                "event",
                                "description",
                                "causer_name",
                                "properties",
                                "created_at"
                            ]
                        }
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "status",
                    "status_label",
                    "amount",
                    "formatted_amount",
                    "currency",
                    "provider",
                    "provider_session_id",
                    "provider_payment_id",
                    "provider_refund_id",
                    "has_active_entitlement",
                    "plan",
                    "audience_member",
                    "created_at",
                    "updated_at"
                ],
                "title": "PurchaseResource"
            },
            "PurchaseStatus": {
                "type": "string",
                "enum": [
                    "pending",
                    "completed",
                    "failed",
                    "refunded"
                ],
                "title": "PurchaseStatus"
            },
            "TemplateResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "html": {
                        "type": "string"
                    },
                    "css": {
                        "type": "string"
                    },
                    "js": {
                        "type": "string"
                    },
                    "external_css_urls": {
                        "type": "string"
                    },
                    "fields": {
                        "description": "`fields` casts to null for a template row with no fields column data (e.g. a\ndegenerate/legacy row) \u2014 a single such template must not 500 the whole tenant's\nsnapshot build, since this resource feeds every automatic interaction's inlined\ntemplate payload on the hottest endpoint in the product.",
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "supports": {
                        "anyOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "minItems": 0,
                                "maxItems": 0,
                                "additionalItems": false
                            }
                        ]
                    },
                    "template_json": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "title",
                    "slug",
                    "html",
                    "css",
                    "js",
                    "external_css_urls",
                    "fields",
                    "supports"
                ],
                "title": "TemplateResource"
            },
            "UpdateSessionProfileRequest": {
                "type": "object",
                "description": "Validates a member's edit of their own audience-member record.\n\nOnly `name` is writable. Email changes have their own verification flow and\nare refused here by omission rather than by a `prohibited` rule, so a client\nsending a whole profile object is not blocked from updating the name.",
                "properties": {
                    "name": {
                        "type": "string",
                        "maxLength": 255
                    }
                },
                "title": "UpdateSessionProfileRequest"
            },
            "UserAttributeResource": {
                "type": "object",
                "properties": {
                    "slug": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "options": {
                        "type": "string"
                    },
                    "value": {
                        "type": "string"
                    },
                    "user_editable": {
                        "type": "string"
                    },
                    "validation_rules": {
                        "type": "string"
                    },
                    "private": {
                        "type": "string"
                    }
                },
                "required": [
                    "slug",
                    "name",
                    "description",
                    "type",
                    "options",
                    "value",
                    "user_editable",
                    "validation_rules",
                    "private"
                ],
                "title": "UserAttributeResource"
            }
        },
        "responses": {
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}