{
    "x-signed": true,
    "openapi": "3.1.0",
    "info": {
        "title": "Plainrouter Conversion API",
        "version": "0.5.0",
        "description": "Plainrouter public Signals Conversion API."
    },
    "servers": [
        {
            "url": "https://plainrouter.com/api/v1",
            "description": "Production"
        }
    ],
    "security": [
        {
            "workspaceSecret": []
        }
    ],
    "paths": {
        "/events": {
            "post": {
                "operationId": "createEvent",
                "description": "Accepts a consent-aware server-side conversion event and uses event_id or Idempotency-Key to make retries idempotent.",
                "summary": "Submit a conversion event",
                "tags": [
                    "Event"
                ],
                "parameters": [
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Optional idempotency key. When event_id is omitted, Plainrouter uses this value as event_id. If both are supplied, they must match.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "description": "Authenticated secret-key server callers may supply client_ip_address and client_user_agent in user_data; publishable-key browser traffic takes those fields only from the trusted edge.",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "anyOf": [
                                    {
                                        "type": "object",
                                        "properties": {
                                            "event_id": {
                                                "type": "string",
                                                "description": "Caller-supplied idempotency key; maximum 128 characters."
                                            },
                                            "event_name": {
                                                "type": "string",
                                                "description": "Signal event name; maximum 100 characters."
                                            },
                                            "parent_event_id": {
                                                "type": "string",
                                                "description": "Optional parent event id; maximum 128 characters."
                                            },
                                            "event_time": {
                                                "description": "Unix timestamp or ISO-8601 date-time. Defaults to receipt time.",
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            },
                                            "event_source": {
                                                "type": "string",
                                                "format": "uri",
                                                "description": "Optional absolute source URL."
                                            },
                                            "action_source": {
                                                "type": "string",
                                                "description": "Optional action source; defaults to website and is limited to 50 characters."
                                            },
                                            "visitor_id": {
                                                "type": "string",
                                                "description": "Optional visitor identifier; maximum 255 characters."
                                            },
                                            "consent_basis": {
                                                "type": "string",
                                                "description": "Legal basis for processing. Legitimate-interest revenue lifecycle events are rejected; use an authenticated server adapter.",
                                                "const": "consent"
                                            },
                                            "consent": {
                                                "type": "object",
                                                "description": "Consent state supplied with the event.",
                                                "additionalProperties": {}
                                            },
                                            "consent_mode": {
                                                "type": "object",
                                                "description": "Consent Mode v2 signal values supplied with the event.",
                                                "additionalProperties": {}
                                            },
                                            "tcf": {
                                                "type": "object",
                                                "description": "TCF v2 data containing string and optional captured_at.",
                                                "additionalProperties": {}
                                            },
                                            "user_data": {
                                                "type": "object",
                                                "description": "Identity fields accepted by the tracker.",
                                                "additionalProperties": {}
                                            },
                                            "click_ids": {
                                                "type": "object",
                                                "description": "Advertising click identifiers.",
                                                "additionalProperties": {}
                                            },
                                            "value_data": {
                                                "type": "object",
                                                "description": "Optional commerce data. Contents accepts at most 50 items and 16 KB serialized.",
                                                "properties": {
                                                    "value": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "order_id": {
                                                        "type": "string"
                                                    },
                                                    "contents": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "num_items": {
                                                        "type": "integer"
                                                    }
                                                }
                                            }
                                        },
                                        "required": [
                                            "event_name",
                                            "consent_basis"
                                        ]
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "event_id": {
                                                "type": "string",
                                                "description": "Caller-supplied idempotency key; maximum 128 characters."
                                            },
                                            "event_name": {
                                                "type": "string",
                                                "description": "Signal event name; maximum 100 characters.",
                                                "enum": [
                                                    "signal_verification",
                                                    "consent_withdrawal"
                                                ]
                                            },
                                            "parent_event_id": {
                                                "type": "string",
                                                "description": "Optional parent event id; maximum 128 characters."
                                            },
                                            "event_time": {
                                                "description": "Unix timestamp or ISO-8601 date-time. Defaults to receipt time.",
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            },
                                            "event_source": {
                                                "type": "string",
                                                "format": "uri",
                                                "description": "Optional absolute source URL."
                                            },
                                            "action_source": {
                                                "type": "string",
                                                "description": "Optional action source; defaults to website and is limited to 50 characters."
                                            },
                                            "visitor_id": {
                                                "type": "string",
                                                "description": "Optional visitor identifier; maximum 255 characters."
                                            },
                                            "consent_basis": {
                                                "type": "string",
                                                "description": "Legal basis for processing. Legitimate-interest revenue lifecycle events are rejected; use an authenticated server adapter.",
                                                "const": "legitimate_interest"
                                            },
                                            "consent": {
                                                "type": "object",
                                                "description": "Consent state supplied with the event.",
                                                "additionalProperties": {}
                                            },
                                            "consent_mode": {
                                                "type": "object",
                                                "description": "Consent Mode v2 signal values supplied with the event.",
                                                "additionalProperties": {}
                                            },
                                            "tcf": {
                                                "type": "object",
                                                "description": "TCF v2 data containing string and optional captured_at.",
                                                "additionalProperties": {}
                                            },
                                            "user_data": {
                                                "type": "object",
                                                "description": "Identity fields accepted by the tracker.",
                                                "additionalProperties": {}
                                            },
                                            "click_ids": {
                                                "type": "object",
                                                "description": "Advertising click identifiers.",
                                                "additionalProperties": {}
                                            },
                                            "value_data": {
                                                "type": "object",
                                                "description": "Optional commerce data. Contents accepts at most 50 items and 16 KB serialized.",
                                                "properties": {
                                                    "value": {
                                                        "type": "string"
                                                    },
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "order_id": {
                                                        "type": "string"
                                                    },
                                                    "contents": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "num_items": {
                                                        "type": "integer"
                                                    }
                                                }
                                            }
                                        },
                                        "required": [
                                            "event_name",
                                            "consent_basis"
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Duplicate event accepted idempotently.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "duplicate": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "duplicate"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "Canonical event resource to poll for delivery state.",
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            },
                            "Idempotency-Key": {
                                "description": "Echoes the Idempotency-Key supplied by the caller.",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "New event accepted for processing.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "duplicate": {
                                            "type": "boolean"
                                        },
                                        "warnings": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "$ref": "#/components/schemas/IngestionWarningCode"
                                                    },
                                                    "field": {
                                                        "type": "string",
                                                        "const": "consent.captured_at"
                                                    },
                                                    "message": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "field",
                                                    "message"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "duplicate",
                                        "warnings"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "Canonical event resource to poll for delivery state.",
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            },
                            "Idempotency-Key": {
                                "description": "Echoes the Idempotency-Key supplied by the caller.",
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/verification-events": {
            "post": {
                "operationId": "verifySignalIngestion",
                "description": "Records one idempotent, identity-free modeled event to confirm workspace-scoped ingestion. It does not count as real arrival evidence or complete onboarding.",
                "summary": "Verify server-side Signal ingestion",
                "tags": [
                    "Event"
                ],
                "responses": {
                    "200": {
                        "description": "The idempotent server verification event already exists.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "duplicate": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "duplicate"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "Canonical verification-event resource to poll.",
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Server-side Signal ingestion verified.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "duplicate": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "duplicate"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "Canonical verification-event resource to poll.",
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/events/{event}": {
            "get": {
                "operationId": "getEvent",
                "description": "Returns one retained customer-readable event with lineage and destination delivery state for scoped troubleshooting and acceptance checks.",
                "summary": "Get an event and delivery trace",
                "tags": [
                    "Event"
                ],
                "parameters": [
                    {
                        "name": "event",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Event, lineage, and destination delivery state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "workspace_id": {
                                                    "type": "integer"
                                                },
                                                "signal_tracker_id": {
                                                    "type": "string",
                                                    "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                    "deprecated": true
                                                },
                                                "parent_event_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "event_name": {
                                                    "type": "string"
                                                },
                                                "event_time": {
                                                    "type": "string"
                                                },
                                                "action_source": {
                                                    "type": "string"
                                                },
                                                "event_class": {
                                                    "type": "string"
                                                },
                                                "order_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "value_amount": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "value_currency": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "consent_basis": {
                                                    "type": "string"
                                                },
                                                "measurement_class": {
                                                    "type": "string"
                                                },
                                                "attribution_join": {
                                                    "type": "string"
                                                },
                                                "enforcement_scope": {
                                                    "type": "string"
                                                },
                                                "consent_normalization_version": {
                                                    "type": "string"
                                                },
                                                "consent": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "user_data_hashed": {
                                                    "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "click_ids": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "session": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "value_data": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "event_source": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "payload_expired": {
                                                    "type": "boolean"
                                                },
                                                "deliveries": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "event_id": {
                                                                "type": "string"
                                                            },
                                                            "destination_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "status": {
                                                                "$ref": "#/components/schemas/DeliveryStatus"
                                                            },
                                                            "is_test": {
                                                                "type": "boolean"
                                                            },
                                                            "attempt_count": {
                                                                "type": "integer"
                                                            },
                                                            "last_error": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "platform_response": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "platform_trace_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "next_attempt_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "updated_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "event_id",
                                                            "destination_id",
                                                            "status",
                                                            "is_test",
                                                            "attempt_count",
                                                            "last_error",
                                                            "platform_response",
                                                            "platform_trace_id",
                                                            "next_attempt_at",
                                                            "created_at",
                                                            "updated_at"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "workspace_id",
                                                "signal_tracker_id",
                                                "parent_event_id",
                                                "event_name",
                                                "event_time",
                                                "action_source",
                                                "event_class",
                                                "order_id",
                                                "value_amount",
                                                "value_currency",
                                                "created_at",
                                                "consent_basis",
                                                "measurement_class",
                                                "attribution_join",
                                                "enforcement_scope",
                                                "consent_normalization_version",
                                                "consent",
                                                "user_data_hashed",
                                                "click_ids",
                                                "session",
                                                "value_data",
                                                "event_source",
                                                "payload_expired",
                                                "deliveries"
                                            ]
                                        },
                                        "lineage": {
                                            "type": "object",
                                            "properties": {
                                                "parent": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "workspace_id": {
                                                            "type": "integer"
                                                        },
                                                        "signal_tracker_id": {
                                                            "type": "string",
                                                            "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                            "deprecated": true
                                                        },
                                                        "parent_event_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "event_name": {
                                                            "type": "string"
                                                        },
                                                        "event_time": {
                                                            "type": "string"
                                                        },
                                                        "action_source": {
                                                            "type": "string"
                                                        },
                                                        "event_class": {
                                                            "type": "string"
                                                        },
                                                        "order_id": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "value_amount": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "value_currency": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "created_at": {
                                                            "type": "string"
                                                        },
                                                        "consent_basis": {
                                                            "type": "string"
                                                        },
                                                        "measurement_class": {
                                                            "type": "string"
                                                        },
                                                        "attribution_join": {
                                                            "type": "string"
                                                        },
                                                        "enforcement_scope": {
                                                            "type": "string"
                                                        },
                                                        "consent_normalization_version": {
                                                            "type": "string"
                                                        },
                                                        "consent": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "user_data_hashed": {
                                                            "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "click_ids": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "session": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "value_data": {
                                                            "anyOf": [
                                                                {
                                                                    "type": "object",
                                                                    "additionalProperties": {}
                                                                },
                                                                {
                                                                    "type": "array",
                                                                    "items": {}
                                                                },
                                                                {
                                                                    "type": "null"
                                                                }
                                                            ]
                                                        },
                                                        "event_source": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "payload_expired": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "workspace_id",
                                                        "signal_tracker_id",
                                                        "parent_event_id",
                                                        "event_name",
                                                        "event_time",
                                                        "action_source",
                                                        "event_class",
                                                        "order_id",
                                                        "value_amount",
                                                        "value_currency",
                                                        "created_at",
                                                        "consent_basis",
                                                        "measurement_class",
                                                        "attribution_join",
                                                        "enforcement_scope",
                                                        "consent_normalization_version",
                                                        "consent",
                                                        "user_data_hashed",
                                                        "click_ids",
                                                        "session",
                                                        "value_data",
                                                        "event_source",
                                                        "payload_expired"
                                                    ]
                                                },
                                                "children": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "parent_event_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "event_name": {
                                                                "type": "string"
                                                            },
                                                            "event_time": {
                                                                "type": "string"
                                                            },
                                                            "action_source": {
                                                                "type": "string"
                                                            },
                                                            "event_class": {
                                                                "type": "string"
                                                            },
                                                            "order_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_amount": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_currency": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "consent_basis": {
                                                                "type": "string"
                                                            },
                                                            "measurement_class": {
                                                                "type": "string"
                                                            },
                                                            "attribution_join": {
                                                                "type": "string"
                                                            },
                                                            "enforcement_scope": {
                                                                "type": "string"
                                                            },
                                                            "consent_normalization_version": {
                                                                "type": "string"
                                                            },
                                                            "consent": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "user_data_hashed": {
                                                                "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "click_ids": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "session": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "value_data": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "event_source": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "payload_expired": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "parent_event_id",
                                                            "event_name",
                                                            "event_time",
                                                            "action_source",
                                                            "event_class",
                                                            "order_id",
                                                            "value_amount",
                                                            "value_currency",
                                                            "created_at",
                                                            "consent_basis",
                                                            "measurement_class",
                                                            "attribution_join",
                                                            "enforcement_scope",
                                                            "consent_normalization_version",
                                                            "consent",
                                                            "user_data_hashed",
                                                            "click_ids",
                                                            "session",
                                                            "value_data",
                                                            "event_source",
                                                            "payload_expired"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "parent",
                                                "children"
                                            ]
                                        },
                                        "deliveries": {
                                            "type": "array",
                                            "items": {
                                                "allOf": [
                                                    {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "integer"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "event_id": {
                                                                "type": "string"
                                                            },
                                                            "destination_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "status": {
                                                                "$ref": "#/components/schemas/DeliveryStatus"
                                                            },
                                                            "is_test": {
                                                                "type": "boolean"
                                                            },
                                                            "attempt_count": {
                                                                "type": "integer"
                                                            },
                                                            "last_error": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "platform_response": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "platform_trace_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "next_attempt_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "updated_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "event_id",
                                                            "destination_id",
                                                            "status",
                                                            "is_test",
                                                            "attempt_count",
                                                            "last_error",
                                                            "platform_response",
                                                            "platform_trace_id",
                                                            "next_attempt_at",
                                                            "created_at",
                                                            "updated_at"
                                                        ]
                                                    },
                                                    {
                                                        "type": "object",
                                                        "properties": {
                                                            "explanation": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "explanation"
                                                        ]
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "event",
                                        "lineage",
                                        "deliveries"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/dashboard/events": {
            "get": {
                "operationId": "listEvents",
                "description": "Returns retained customer-readable events with stable pagination and aggregate destination-delivery acceptance metrics for the workspace.",
                "summary": "List recent events",
                "tags": [
                    "Operations"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Events per page, capped at 100.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Page-number-paginated events and delivery acceptance metrics.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "events": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "parent_event_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "event_name": {
                                                                "type": "string"
                                                            },
                                                            "event_time": {
                                                                "type": "string"
                                                            },
                                                            "action_source": {
                                                                "type": "string"
                                                            },
                                                            "event_class": {
                                                                "type": "string"
                                                            },
                                                            "order_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_amount": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_currency": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "consent_basis": {
                                                                "type": "string"
                                                            },
                                                            "measurement_class": {
                                                                "type": "string"
                                                            },
                                                            "attribution_join": {
                                                                "type": "string"
                                                            },
                                                            "enforcement_scope": {
                                                                "type": "string"
                                                            },
                                                            "consent_normalization_version": {
                                                                "type": "string"
                                                            },
                                                            "consent": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "user_data_hashed": {
                                                                "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "click_ids": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "session": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "value_data": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "event_source": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "payload_expired": {
                                                                "type": "boolean"
                                                            },
                                                            "deliveries": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "workspace_id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "signal_tracker_id": {
                                                                            "type": "string",
                                                                            "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                            "deprecated": true
                                                                        },
                                                                        "event_id": {
                                                                            "type": "string"
                                                                        },
                                                                        "destination_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "status": {
                                                                            "$ref": "#/components/schemas/DeliveryStatus"
                                                                        },
                                                                        "is_test": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "attempt_count": {
                                                                            "type": "integer"
                                                                        },
                                                                        "last_error": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "object",
                                                                                    "additionalProperties": {}
                                                                                },
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "platform_response": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "object",
                                                                                    "additionalProperties": {}
                                                                                },
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "platform_trace_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "next_attempt_at": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "created_at": {
                                                                            "type": "string"
                                                                        },
                                                                        "updated_at": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "id",
                                                                        "workspace_id",
                                                                        "signal_tracker_id",
                                                                        "event_id",
                                                                        "destination_id",
                                                                        "status",
                                                                        "is_test",
                                                                        "attempt_count",
                                                                        "last_error",
                                                                        "platform_response",
                                                                        "platform_trace_id",
                                                                        "next_attempt_at",
                                                                        "created_at",
                                                                        "updated_at"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "parent_event_id",
                                                            "event_name",
                                                            "event_time",
                                                            "action_source",
                                                            "event_class",
                                                            "order_id",
                                                            "value_amount",
                                                            "value_currency",
                                                            "created_at",
                                                            "consent_basis",
                                                            "measurement_class",
                                                            "attribution_join",
                                                            "enforcement_scope",
                                                            "consent_normalization_version",
                                                            "consent",
                                                            "user_data_hashed",
                                                            "click_ids",
                                                            "session",
                                                            "value_data",
                                                            "event_source",
                                                            "payload_expired",
                                                            "deliveries"
                                                        ]
                                                    }
                                                },
                                                "first_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "last_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "next_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "prev_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "data",
                                                "first_page_url",
                                                "from",
                                                "last_page",
                                                "last_page_url",
                                                "links",
                                                "next_page_url",
                                                "path",
                                                "per_page",
                                                "prev_page_url",
                                                "to",
                                                "total"
                                            ]
                                        },
                                        "metrics": {
                                            "type": "object",
                                            "properties": {
                                                "accepted": {
                                                    "type": "integer"
                                                },
                                                "total_deliveries": {
                                                    "type": "integer"
                                                },
                                                "acceptance_rate": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "acceptance_rate_window": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "accepted",
                                                "total_deliveries",
                                                "acceptance_rate",
                                                "acceptance_rate_window"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "events",
                                        "metrics"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/dashboard/events/cursor": {
            "get": {
                "operationId": "listEventsByCursor",
                "description": "Returns retained customer-readable events using stable cursor pagination and aggregate destination-delivery acceptance metrics.",
                "summary": "List recent events by cursor",
                "tags": [
                    "Operations"
                ],
                "parameters": [
                    {
                        "name": "per_page",
                        "in": "query",
                        "description": "Events per cursor page, capped at 100.",
                        "schema": {
                            "type": "integer",
                            "default": 25
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "description": "Opaque cursor returned by a previous response. Omit it on the first request.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Cursor-paginated events and delivery acceptance metrics.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "events": {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "parent_event_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "event_name": {
                                                                "type": "string"
                                                            },
                                                            "event_time": {
                                                                "type": "string"
                                                            },
                                                            "action_source": {
                                                                "type": "string"
                                                            },
                                                            "event_class": {
                                                                "type": "string"
                                                            },
                                                            "order_id": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_amount": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "value_currency": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "consent_basis": {
                                                                "type": "string"
                                                            },
                                                            "measurement_class": {
                                                                "type": "string"
                                                            },
                                                            "attribution_join": {
                                                                "type": "string"
                                                            },
                                                            "enforcement_scope": {
                                                                "type": "string"
                                                            },
                                                            "consent_normalization_version": {
                                                                "type": "string"
                                                            },
                                                            "consent": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "user_data_hashed": {
                                                                "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "click_ids": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "session": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "value_data": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "event_source": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "payload_expired": {
                                                                "type": "boolean"
                                                            },
                                                            "deliveries": {
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "workspace_id": {
                                                                            "type": "integer"
                                                                        },
                                                                        "signal_tracker_id": {
                                                                            "type": "string",
                                                                            "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                            "deprecated": true
                                                                        },
                                                                        "event_id": {
                                                                            "type": "string"
                                                                        },
                                                                        "destination_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "status": {
                                                                            "$ref": "#/components/schemas/DeliveryStatus"
                                                                        },
                                                                        "is_test": {
                                                                            "type": "boolean"
                                                                        },
                                                                        "attempt_count": {
                                                                            "type": "integer"
                                                                        },
                                                                        "last_error": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "object",
                                                                                    "additionalProperties": {}
                                                                                },
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "platform_response": {
                                                                            "anyOf": [
                                                                                {
                                                                                    "type": "object",
                                                                                    "additionalProperties": {}
                                                                                },
                                                                                {
                                                                                    "type": "array",
                                                                                    "items": {}
                                                                                },
                                                                                {
                                                                                    "type": "null"
                                                                                }
                                                                            ]
                                                                        },
                                                                        "platform_trace_id": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "next_attempt_at": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "created_at": {
                                                                            "type": "string"
                                                                        },
                                                                        "updated_at": {
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "id",
                                                                        "workspace_id",
                                                                        "signal_tracker_id",
                                                                        "event_id",
                                                                        "destination_id",
                                                                        "status",
                                                                        "is_test",
                                                                        "attempt_count",
                                                                        "last_error",
                                                                        "platform_response",
                                                                        "platform_trace_id",
                                                                        "next_attempt_at",
                                                                        "created_at",
                                                                        "updated_at"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "parent_event_id",
                                                            "event_name",
                                                            "event_time",
                                                            "action_source",
                                                            "event_class",
                                                            "order_id",
                                                            "value_amount",
                                                            "value_currency",
                                                            "created_at",
                                                            "consent_basis",
                                                            "measurement_class",
                                                            "attribution_join",
                                                            "enforcement_scope",
                                                            "consent_normalization_version",
                                                            "consent",
                                                            "user_data_hashed",
                                                            "click_ids",
                                                            "session",
                                                            "value_data",
                                                            "event_source",
                                                            "payload_expired",
                                                            "deliveries"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev_page_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data",
                                                "path",
                                                "per_page",
                                                "next_cursor",
                                                "next_page_url",
                                                "prev_cursor",
                                                "prev_page_url"
                                            ]
                                        },
                                        "metrics": {
                                            "type": "object",
                                            "properties": {
                                                "accepted": {
                                                    "type": "integer"
                                                },
                                                "total_deliveries": {
                                                    "type": "integer"
                                                },
                                                "acceptance_rate": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "acceptance_rate_window": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "accepted",
                                                "total_deliveries",
                                                "acceptance_rate",
                                                "acceptance_rate_window"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "events",
                                        "metrics"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/destinations/{destination}/test-mode": {
            "patch": {
                "operationId": "setDestinationTestMode",
                "description": "Enables or disables Meta Test Events mode for a destination owned by the authenticated Signals workspace.",
                "summary": "Configure destination test mode",
                "tags": [
                    "Operations"
                ],
                "parameters": [
                    {
                        "name": "destination",
                        "in": "path",
                        "required": true,
                        "description": "The destination ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    },
                                    "test_event_code": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 100
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Updated destination and its effective test-mode state.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "destination": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "workspace_id": {
                                                    "type": "integer"
                                                },
                                                "signal_tracker_id": {
                                                    "type": "string",
                                                    "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                    "deprecated": true
                                                },
                                                "platform_ad_account_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "$ref": "#/components/schemas/DestinationType"
                                                },
                                                "credential_source": {
                                                    "$ref": "#/components/schemas/DestinationCredentialSource"
                                                },
                                                "config": {
                                                    "anyOf": [
                                                        {
                                                            "type": "object",
                                                            "additionalProperties": {}
                                                        },
                                                        {
                                                            "type": "array",
                                                            "items": {}
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "$ref": "#/components/schemas/DestinationStatus"
                                                },
                                                "created_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "updated_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "workspace_id",
                                                "signal_tracker_id",
                                                "platform_ad_account_id",
                                                "type",
                                                "credential_source",
                                                "config",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        },
                                        "test_mode": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "destination",
                                        "test_mode"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/destinations/{destination}/test-purchase": {
            "post": {
                "operationId": "sendTestPurchase",
                "description": "Creates an identity-free synthetic purchase and sends it only to the selected destination while test mode is enabled.",
                "summary": "Send a controlled test purchase",
                "tags": [
                    "Operations"
                ],
                "parameters": [
                    {
                        "name": "destination",
                        "in": "path",
                        "required": true,
                        "description": "The destination ID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^-?\\d+(?:\\.\\d+)?$"
                                    },
                                    "currency": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 3,
                                        "maxLength": 3
                                    },
                                    "order_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 128
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Meta accepted the test purchase.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "$ref": "#/components/schemas/DeliveryStatus"
                                        },
                                        "trace_id": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "status",
                                        "trace_id"
                                    ]
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "Meta did not accept the test purchase.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "$ref": "#/components/schemas/DeliveryStatus"
                                        },
                                        "trace_id": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "event_id",
                                        "status",
                                        "trace_id"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Resource not found.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Test mode is disabled or request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "$ref": "#/components/schemas/ValidationError"
                                        },
                                        {
                                            "$ref": "#/components/schemas/ErrorMessage"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/deliveries/replay": {
            "post": {
                "operationId": "replayDeliveries",
                "description": "Evaluates retained failed deliveries, queues the eligible subset for another delivery attempt, and reports which records were accepted or rejected.",
                "summary": "Replay eligible deliveries",
                "tags": [
                    "Operations"
                ],
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "delivery_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "integer"
                                        }
                                    },
                                    "event_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 100
                                    },
                                    "limit": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "202": {
                        "description": "Replay candidates were evaluated and eligible deliveries queued.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "queued": {
                                            "type": "integer"
                                        },
                                        "expired": {
                                            "type": "integer"
                                        },
                                        "payload_expired": {
                                            "type": "integer"
                                        },
                                        "capped": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "queued",
                                        "expired",
                                        "payload_expired",
                                        "capped"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Location": {
                                "description": "Event collection to poll for updated delivery state.",
                                "schema": {
                                    "type": "string",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reports/reconciliation": {
            "get": {
                "operationId": "getReconciliationReport",
                "description": "Returns stored delivery-versus-platform reconciliation results for one calendar date so callers can compare accepted gateway and provider outcomes.",
                "summary": "Get a reconciliation report",
                "tags": [
                    "Operations"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Stored reconciliation reports for the requested date.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "date": {
                                            "type": "string"
                                        },
                                        "reports": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "workspace_id": {
                                                        "type": "integer"
                                                    },
                                                    "signal_tracker_id": {
                                                        "type": "string",
                                                        "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                        "deprecated": true
                                                    },
                                                    "destination_id": {
                                                        "type": "string"
                                                    },
                                                    "report_date": {
                                                        "type": "string"
                                                    },
                                                    "accepted_count": {
                                                        "type": "integer"
                                                    },
                                                    "meta_count": {
                                                        "type": "integer"
                                                    },
                                                    "observed_gap": {
                                                        "type": "integer"
                                                    },
                                                    "event_counts": {
                                                        "type": "object",
                                                        "properties": {
                                                            "accepted": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {
                                                                            "type": "integer"
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    }
                                                                ]
                                                            },
                                                            "meta": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {
                                                                            "type": "integer"
                                                                        }
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    }
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "accepted",
                                                            "meta"
                                                        ]
                                                    },
                                                    "buckets": {
                                                        "type": "object",
                                                        "additionalProperties": {
                                                            "type": "object",
                                                            "properties": {
                                                                "count": {
                                                                    "type": "integer"
                                                                },
                                                                "basis": {
                                                                    "type": "string"
                                                                },
                                                                "explanation": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "count",
                                                                "basis",
                                                                "explanation"
                                                            ]
                                                        }
                                                    },
                                                    "unexplained_residual": {
                                                        "type": "integer"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "destination": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "workspace_id": {
                                                                "type": "integer"
                                                            },
                                                            "signal_tracker_id": {
                                                                "type": "string",
                                                                "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                                "deprecated": true
                                                            },
                                                            "platform_ad_account_id": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "type": {
                                                                "$ref": "#/components/schemas/DestinationType"
                                                            },
                                                            "credential_source": {
                                                                "$ref": "#/components/schemas/DestinationCredentialSource"
                                                            },
                                                            "config": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "object",
                                                                        "additionalProperties": {}
                                                                    },
                                                                    {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    },
                                                                    {
                                                                        "type": "null"
                                                                    }
                                                                ]
                                                            },
                                                            "status": {
                                                                "$ref": "#/components/schemas/DestinationStatus"
                                                            },
                                                            "created_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "updated_at": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "workspace_id",
                                                            "signal_tracker_id",
                                                            "platform_ad_account_id",
                                                            "type",
                                                            "credential_source",
                                                            "config",
                                                            "status",
                                                            "created_at",
                                                            "updated_at"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "workspace_id",
                                                    "signal_tracker_id",
                                                    "destination_id",
                                                    "report_date",
                                                    "accepted_count",
                                                    "meta_count",
                                                    "observed_gap",
                                                    "event_counts",
                                                    "buckets",
                                                    "unexplained_residual",
                                                    "status",
                                                    "created_at",
                                                    "updated_at",
                                                    "destination"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "date",
                                        "reports"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/reports/emq": {
            "get": {
                "operationId": "getEmqReport",
                "description": "Returns recent Meta Event Match Quality snapshots for the authenticated Signals workspace so callers can inspect measured quality changes over time.",
                "summary": "Get Event Match Quality history",
                "tags": [
                    "Operations"
                ],
                "responses": {
                    "200": {
                        "description": "Recent event-match-quality snapshots.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "snapshots": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "workspace_id": {
                                                        "type": "integer"
                                                    },
                                                    "signal_tracker_id": {
                                                        "type": "string",
                                                        "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                                                        "deprecated": true
                                                    },
                                                    "destination_id": {
                                                        "type": "string"
                                                    },
                                                    "score": {
                                                        "type": "number"
                                                    },
                                                    "week_over_week_change": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "alerted": {
                                                        "type": "boolean"
                                                    },
                                                    "platform_response": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "additionalProperties": {}
                                                            },
                                                            {
                                                                "type": "array",
                                                                "items": {}
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ]
                                                    },
                                                    "measured_at": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "updated_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "workspace_id",
                                                    "signal_tracker_id",
                                                    "destination_id",
                                                    "score",
                                                    "week_over_week_change",
                                                    "alerted",
                                                    "platform_response",
                                                    "measured_at",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "snapshots"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/user-data": {
            "delete": {
                "operationId": "deleteUserData",
                "description": "Idempotently removes retained user data using a verified raw identifier or legacy SHA-256 digest, scoped and keyed to the authenticated workspace.",
                "summary": "Delete user data by verified identifier",
                "tags": [
                    "Operations"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "identifier_type": {
                                        "type": "string",
                                        "enum": [
                                            "email",
                                            "phone",
                                            "external_id"
                                        ]
                                    },
                                    "identifier_hash": {
                                        "type": "string",
                                        "pattern": "^[a-fA-F0-9]{64}$"
                                    },
                                    "identifier": {
                                        "type": "string",
                                        "maxLength": 512
                                    }
                                },
                                "required": [
                                    "identifier_type"
                                ],
                                "oneOf": [
                                    {
                                        "required": [
                                            "identifier_hash"
                                        ]
                                    },
                                    {
                                        "required": [
                                            "identifier"
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Completed idempotent deletion request.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "deletion_request_id": {
                                            "type": "string"
                                        },
                                        "duplicate": {
                                            "type": "boolean"
                                        },
                                        "events_updated": {
                                            "type": "integer"
                                        },
                                        "sessions_updated": {
                                            "type": "integer"
                                        },
                                        "completed_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "deletion_request_id",
                                        "duplicate",
                                        "events_updated",
                                        "sessions_updated",
                                        "completed_at"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing Signals workspace secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/sandbox": {
            "get": {
                "operationId": "getSandbox",
                "description": "Returns a ready-to-run synthetic event example that needs no account or API key and cannot persist data or contact an advertising provider.",
                "summary": "Discover the zero-auth sandbox",
                "tags": [
                    "Sandbox"
                ],
                "responses": {
                    "200": {
                        "description": "Sandbox capabilities and a ready-to-run example.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "environment": {
                                            "type": "string"
                                        },
                                        "authentication_required": {
                                            "type": "boolean"
                                        },
                                        "account_required": {
                                            "type": "boolean"
                                        },
                                        "production_data": {
                                            "type": "boolean"
                                        },
                                        "persists_data": {
                                            "type": "boolean"
                                        },
                                        "provider_delivery": {
                                            "type": "boolean"
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "self_serve_key": {
                                            "type": "object",
                                            "properties": {
                                                "method": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "authentication_required": {
                                                    "type": "boolean"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "issued_key": {
                                                    "type": "object",
                                                    "properties": {
                                                        "api_key": {
                                                            "type": "string"
                                                        },
                                                        "token_type": {
                                                            "type": "string"
                                                        },
                                                        "expires_in": {
                                                            "type": "integer"
                                                        },
                                                        "expires_at": {
                                                            "type": "string"
                                                        },
                                                        "scope": {
                                                            "type": "string"
                                                        },
                                                        "production_access": {
                                                            "type": "boolean"
                                                        },
                                                        "use": {
                                                            "type": "object",
                                                            "properties": {
                                                                "method": {
                                                                    "type": "string"
                                                                },
                                                                "url": {
                                                                    "type": "string"
                                                                },
                                                                "authorization": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "method",
                                                                "url",
                                                                "authorization"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "api_key",
                                                        "token_type",
                                                        "expires_in",
                                                        "expires_at",
                                                        "scope",
                                                        "production_access",
                                                        "use"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "method",
                                                "url",
                                                "authentication_required",
                                                "description",
                                                "issued_key"
                                            ]
                                        },
                                        "try": {
                                            "type": "object",
                                            "properties": {
                                                "method": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "content_type": {
                                                    "type": "string"
                                                },
                                                "body": {
                                                    "type": "object",
                                                    "properties": {
                                                        "event_id": {
                                                            "type": "string"
                                                        },
                                                        "event_name": {
                                                            "type": "string"
                                                        },
                                                        "action_source": {
                                                            "type": "string"
                                                        },
                                                        "value_data": {
                                                            "type": "object",
                                                            "properties": {
                                                                "value": {
                                                                    "type": "string"
                                                                },
                                                                "currency": {
                                                                    "type": "string"
                                                                },
                                                                "order_id": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "value",
                                                                "currency",
                                                                "order_id"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "event_id",
                                                        "event_name",
                                                        "action_source",
                                                        "value_data"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "method",
                                                "url",
                                                "content_type",
                                                "body"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "environment",
                                        "authentication_required",
                                        "account_required",
                                        "production_data",
                                        "persists_data",
                                        "provider_delivery",
                                        "description",
                                        "self_serve_key",
                                        "try"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Access-Control-Allow-Origin": {
                                "schema": {
                                    "type": "string",
                                    "const": "*"
                                }
                            },
                            "Cache-Control": {
                                "schema": {
                                    "type": "string",
                                    "const": "no-store, private"
                                }
                            },
                            "X-Content-Type-Options": {
                                "schema": {
                                    "type": "string",
                                    "const": "nosniff"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/sandbox/keys": {
            "get": {
                "operationId": "getSandboxKey",
                "description": "Returns a short-lived sandbox-only bearer key over GET so a read-only agent can obtain working credentials without issuing a write request.",
                "summary": "Get a sandbox API key",
                "tags": [
                    "Sandbox"
                ],
                "responses": {
                    "200": {
                        "description": "Short-lived sandbox API key issued.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "api_key": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string"
                                        },
                                        "expires_in": {
                                            "type": "integer"
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "scope": {
                                            "type": "string"
                                        },
                                        "production_access": {
                                            "type": "boolean"
                                        },
                                        "use": {
                                            "type": "object",
                                            "properties": {
                                                "method": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "authorization": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "method",
                                                "url",
                                                "authorization"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "api_key",
                                        "token_type",
                                        "expires_in",
                                        "expires_at",
                                        "scope",
                                        "production_access",
                                        "use"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Access-Control-Allow-Origin": {
                                "schema": {
                                    "type": "string",
                                    "const": "*"
                                }
                            },
                            "Cache-Control": {
                                "schema": {
                                    "type": "string",
                                    "const": "no-store, private"
                                }
                            },
                            "X-Content-Type-Options": {
                                "schema": {
                                    "type": "string",
                                    "const": "nosniff"
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "post": {
                "operationId": "createSandboxKey",
                "description": "Issues a short-lived sandbox-only bearer key without an account, human approval, or production access.",
                "summary": "Create a sandbox API key",
                "tags": [
                    "Sandbox"
                ],
                "responses": {
                    "201": {
                        "description": "Short-lived sandbox API key issued.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "api_key": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string"
                                        },
                                        "expires_in": {
                                            "type": "integer"
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        },
                                        "scope": {
                                            "type": "string"
                                        },
                                        "production_access": {
                                            "type": "boolean"
                                        },
                                        "use": {
                                            "type": "object",
                                            "properties": {
                                                "method": {
                                                    "type": "string"
                                                },
                                                "url": {
                                                    "type": "string"
                                                },
                                                "authorization": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "method",
                                                "url",
                                                "authorization"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "api_key",
                                        "token_type",
                                        "expires_in",
                                        "expires_at",
                                        "scope",
                                        "production_access",
                                        "use"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Access-Control-Allow-Origin": {
                                "schema": {
                                    "type": "string",
                                    "const": "*"
                                }
                            },
                            "Cache-Control": {
                                "schema": {
                                    "type": "string",
                                    "const": "no-store, private"
                                }
                            },
                            "X-Content-Type-Options": {
                                "schema": {
                                    "type": "string",
                                    "const": "nosniff"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/sandbox/events": {
            "post": {
                "operationId": "validateSandboxEvent",
                "description": "Validates and immediately discards one identity-free synthetic event. It requires no account or API key and never writes to the ledger or contacts Meta.",
                "summary": "Validate a synthetic event",
                "tags": [
                    "Sandbox"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "event_id": {
                                        "type": "string",
                                        "description": "Optional synthetic idempotency key; maximum 128 characters."
                                    },
                                    "event_name": {
                                        "type": "string",
                                        "description": "Synthetic event name; maximum 100 characters."
                                    },
                                    "action_source": {
                                        "type": "string",
                                        "description": "Synthetic action source.",
                                        "examples": [
                                            "website"
                                        ]
                                    },
                                    "value_data": {
                                        "type": "object",
                                        "description": "Optional synthetic commerce data.",
                                        "properties": {
                                            "value": {
                                                "type": "string"
                                            },
                                            "currency": {
                                                "type": "string"
                                            },
                                            "order_id": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "event_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Synthetic event validated and discarded.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sandbox": {
                                            "type": "boolean"
                                        },
                                        "accepted": {
                                            "type": "boolean"
                                        },
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "persisted": {
                                            "type": "boolean"
                                        },
                                        "provider_delivery": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "sandbox",
                                        "accepted",
                                        "event_id",
                                        "status",
                                        "persisted",
                                        "provider_delivery",
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "Access-Control-Allow-Origin": {
                                "schema": {
                                    "type": "string",
                                    "const": "*"
                                }
                            },
                            "Cache-Control": {
                                "schema": {
                                    "type": "string",
                                    "const": "no-store, private"
                                }
                            },
                            "X-Content-Type-Options": {
                                "schema": {
                                    "type": "string",
                                    "const": "nosniff"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/sandbox/keyed-events": {
            "post": {
                "operationId": "validateSandboxEventWithKey",
                "description": "Validates a synthetic event with a short-lived sandbox key, then discards it without persisting data or contacting an advertising provider.",
                "summary": "Validate a synthetic event with a sandbox key",
                "tags": [
                    "Sandbox"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "event_id": {
                                        "type": "string",
                                        "description": "Optional synthetic idempotency key; maximum 128 characters."
                                    },
                                    "event_name": {
                                        "type": "string",
                                        "description": "Synthetic event name; maximum 100 characters."
                                    },
                                    "action_source": {
                                        "type": "string",
                                        "description": "Synthetic action source.",
                                        "examples": [
                                            "website"
                                        ]
                                    },
                                    "value_data": {
                                        "type": "object",
                                        "description": "Optional synthetic commerce data.",
                                        "properties": {
                                            "value": {
                                                "type": "string"
                                            },
                                            "currency": {
                                                "type": "string"
                                            },
                                            "order_id": {
                                                "type": "string"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "event_name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Synthetic event validated with a sandbox key and discarded.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "sandbox": {
                                            "type": "boolean"
                                        },
                                        "accepted": {
                                            "type": "boolean"
                                        },
                                        "event_id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "persisted": {
                                            "type": "boolean"
                                        },
                                        "provider_delivery": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "sandbox",
                                        "accepted",
                                        "event_id",
                                        "status",
                                        "persisted",
                                        "provider_delivery",
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Sandbox key missing, invalid, or expired.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorMessage"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Request validation failed.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ValidationError"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "sandboxCredential": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "workspaceSecret": {
                "type": "http",
                "description": "Per-workspace bearer secret. It authenticates only the Signals workspace represented by the credential.",
                "scheme": "bearer"
            },
            "sandboxCredential": {
                "type": "http",
                "description": "Short-lived sandbox-only key issued by POST /sandbox/keys.",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "DeliveryStatus": {
                "type": "string",
                "enum": [
                    "queued",
                    "sent",
                    "accepted",
                    "retrying",
                    "failed:auth",
                    "failed:permanent",
                    "failed:unknown",
                    "expired",
                    "skipped:consent",
                    "skipped:no_destination",
                    "skipped:duplicate"
                ],
                "title": "DeliveryStatus"
            },
            "Destination": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "workspace_id": {
                        "type": "integer"
                    },
                    "signal_tracker_id": {
                        "type": "string",
                        "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                        "deprecated": true
                    },
                    "platform_ad_account_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "type": {
                        "$ref": "#/components/schemas/DestinationType"
                    },
                    "credential_source": {
                        "$ref": "#/components/schemas/DestinationCredentialSource"
                    },
                    "config": {
                        "type": "array",
                        "items": {}
                    },
                    "status": {
                        "$ref": "#/components/schemas/DestinationStatus"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "workspace_id",
                    "signal_tracker_id",
                    "platform_ad_account_id",
                    "type",
                    "credential_source",
                    "config",
                    "status",
                    "created_at",
                    "updated_at"
                ],
                "title": "Destination"
            },
            "DestinationCredentialSource": {
                "type": "string",
                "enum": [
                    "oauth_connection",
                    "managed_token"
                ],
                "title": "DestinationCredentialSource"
            },
            "DestinationStatus": {
                "type": "string",
                "enum": [
                    "active",
                    "inactive"
                ],
                "title": "DestinationStatus"
            },
            "DestinationType": {
                "type": "string",
                "enum": [
                    "meta"
                ],
                "title": "DestinationType"
            },
            "EmqSnapshot": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "workspace_id": {
                        "type": "integer"
                    },
                    "signal_tracker_id": {
                        "type": "string",
                        "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                        "deprecated": true
                    },
                    "destination_id": {
                        "type": "string"
                    },
                    "score": {
                        "type": "number"
                    },
                    "week_over_week_change": {
                        "type": [
                            "number",
                            "null"
                        ]
                    },
                    "alerted": {
                        "type": "boolean"
                    },
                    "platform_response": {
                        "type": [
                            "array",
                            "null"
                        ],
                        "items": {}
                    },
                    "measured_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "workspace_id",
                    "signal_tracker_id",
                    "destination_id",
                    "score",
                    "week_over_week_change",
                    "alerted",
                    "platform_response",
                    "measured_at",
                    "created_at",
                    "updated_at"
                ],
                "title": "EmqSnapshot"
            },
            "ErrorMessage": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    }
                },
                "required": [
                    "message"
                ],
                "title": "ErrorMessage"
            },
            "Event": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "parent_event_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "event_name": {
                        "type": "string"
                    },
                    "event_time": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "action_source": {
                        "type": "string"
                    },
                    "event_class": {
                        "type": "string"
                    },
                    "order_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "value_amount": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "value_currency": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "consent_basis": {
                        "type": "string"
                    },
                    "measurement_class": {
                        "type": "string"
                    },
                    "attribution_join": {
                        "type": "string"
                    },
                    "enforcement_scope": {
                        "type": "string"
                    },
                    "consent_normalization_version": {
                        "type": "string"
                    },
                    "policy_class": {
                        "$ref": "#/components/schemas/JurisdictionPolicyClass"
                    },
                    "traffic_class": {
                        "$ref": "#/components/schemas/TrafficClass"
                    },
                    "workspace_id": {
                        "type": "integer"
                    },
                    "consent": {
                        "type": "string"
                    },
                    "user_data_hashed": {
                        "description": "Deprecated compatibility field. The value is always null; delivery identity is never returned.",
                        "anyOf": [
                            {
                                "type": "object",
                                "additionalProperties": {}
                            },
                            {
                                "type": "array",
                                "items": {}
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "click_ids": {
                        "type": "string"
                    },
                    "session": {
                        "type": "string"
                    },
                    "value_data": {
                        "type": "string"
                    },
                    "event_source": {
                        "type": "string"
                    },
                    "payload_expired": {
                        "type": "boolean"
                    },
                    "consent_source": {
                        "type": "string",
                        "enum": [
                            "explicit",
                            "tcf",
                            "consent_mode",
                            "plainrouter",
                            "cmp:cookiebot",
                            "cmp:usercentrics",
                            "cmp:cookieyes",
                            "cmp:consentstack",
                            "cmp:iubenda"
                        ]
                    },
                    "consent_ui_version": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 999999
                    },
                    "deliveries": {
                        "type": "array",
                        "items": {}
                    }
                },
                "required": [
                    "id",
                    "parent_event_id",
                    "event_name",
                    "event_time",
                    "action_source",
                    "event_class",
                    "order_id",
                    "value_amount",
                    "value_currency",
                    "created_at",
                    "consent_basis",
                    "measurement_class",
                    "attribution_join",
                    "enforcement_scope",
                    "consent_normalization_version",
                    "policy_class",
                    "traffic_class",
                    "workspace_id",
                    "consent",
                    "user_data_hashed",
                    "click_ids",
                    "session",
                    "value_data",
                    "event_source",
                    "payload_expired",
                    "deliveries"
                ],
                "title": "Event"
            },
            "IngestionWarningCode": {
                "type": "string",
                "description": "The closed set of non-rejection warnings returned by authenticated ingestion.\n",
                "enum": [
                    "consent_captured_at_invalid"
                ],
                "title": "IngestionWarningCode"
            },
            "JurisdictionPolicyClass": {
                "type": "string",
                "description": "The two policy classes used by the single Signals collector. The enum intentionally has no country or region members. Country evidence is an edge input used to derive a policy class and is never a ledger value.\n",
                "enum": [
                    "strict_eu",
                    "global"
                ],
                "title": "JurisdictionPolicyClass"
            },
            "ReconciliationReport": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "workspace_id": {
                        "type": "integer"
                    },
                    "signal_tracker_id": {
                        "type": "string",
                        "description": "Deprecated alias of workspace_id; contains the workspace ID in decimal string form.",
                        "deprecated": true
                    },
                    "destination_id": {
                        "type": "string"
                    },
                    "report_date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "accepted_count": {
                        "type": "integer"
                    },
                    "meta_count": {
                        "type": "integer"
                    },
                    "observed_gap": {
                        "type": "integer"
                    },
                    "event_counts": {
                        "type": "array",
                        "items": {}
                    },
                    "buckets": {
                        "type": "array",
                        "items": {}
                    },
                    "unexplained_residual": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "claimed_clicks": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "workspace_id",
                    "signal_tracker_id",
                    "destination_id",
                    "report_date",
                    "accepted_count",
                    "meta_count",
                    "observed_gap",
                    "event_counts",
                    "buckets",
                    "unexplained_residual",
                    "status",
                    "created_at",
                    "updated_at",
                    "claimed_clicks"
                ],
                "title": "ReconciliationReport"
            },
            "TrafficClass": {
                "type": "string",
                "description": "The only persisted traffic verdicts for passive document arrivals. Request facts and classifier reasons never cross the stripping boundary.\n",
                "enum": [
                    "valid",
                    "invalid"
                ],
                "title": "TrafficClass"
            },
            "ValidationError": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        }
                    }
                },
                "required": [
                    "message",
                    "errors"
                ],
                "title": "ValidationError"
            }
        }
    }
}
