{
    "openapi": "3.1.0",
    "info": {
        "title": "Agilis Advertising REST API: Webhooks",
        "version": "1.0.0",
        "summary": "Manage the endpoints Agilis sends events to, send test events, and list and resend webhook events.",
        "description": "Return codes are in the JSON body (`return_code`). They are scoped to the endpoint: the same code can mean different things on different endpoints, so read each operation's `x-return-codes`.\n\nRate limits: 60 requests a minute per API key, uploads included. Responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining`; over the limit the API returns 429 with `Retry-After`. Repeated requests with an invalid key are refused for a while with 429 and `Retry-After`. Every bad key returns the same 401 Unauthorised. TEST Offers and Events are deleted 30 days after they end.\n\nHuman-readable reference: https://www.agilis.dating/api-doc · Markdown: https://www.agilis.dating/api-doc.md",
        "contact": {
            "name": "Agilis support",
            "email": "help@agilis.dating",
            "url": "https://www.agilis.dating/api-doc"
        },
        "termsOfService": "https://www.agilis.dating/business/terms"
    },
    "servers": [
        {
            "url": "https://ads.agilis.dating",
            "description": "Production. TEST or LIVE is chosen by the API key (pk_test_ / pk_live_) and the environment parameter."
        }
    ],
    "security": [
        {
            "apiKey": []
        }
    ],
    "tags": [
        {
            "name": "Webhooks"
        }
    ],
    "paths": {
        "/webhook-endpoints": {
            "get": {
                "operationId": "listWebhookEndpoints",
                "summary": "List Webhook Endpoints",
                "description": "Your organisation's webhook endpoints in your key's mode. The signing secret is never returned here: it is shown only when the endpoint is created and when its secret is rolled. Org Admin and Developer API keys only; an Advertiser's key is refused (HTTP 403, `E2`). Endpoints belong to the organisation and to your key's mode: a TEST key sees TEST endpoints only.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#listWebhookEndpointsSection"
                },
                "responses": {
                    "200": {
                        "description": "S1: Endpoints returned (up to 16).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "enabled_events": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "livemode": {
                                                        "type": "boolean"
                                                    },
                                                    "created": {
                                                        "type": "string"
                                                    },
                                                    "last_success_at": {
                                                        "type": "string"
                                                    },
                                                    "failing_since": {
                                                        "description": "Can be null."
                                                    },
                                                    "disabled_by": {
                                                        "description": "Can be null."
                                                    },
                                                    "disabled_reason": {
                                                        "description": "Can be null."
                                                    },
                                                    "previous_secret_expires_at": {
                                                        "description": "Can be null."
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "data": [
                                        {
                                            "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                            "url": "https://hooks.example.com/agilis",
                                            "description": "Order system",
                                            "enabled_events": [
                                                "offer.started",
                                                "offer.ended",
                                                "event.published"
                                            ],
                                            "status": "enabled",
                                            "livemode": false,
                                            "created": "2027-09-20T10:00:00Z",
                                            "last_success_at": "2027-09-21T08:15:02Z",
                                            "failing_since": null,
                                            "disabled_by": null,
                                            "disabled_reason": null,
                                            "previous_secret_expires_at": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Endpoints returned (up to 16).",
                    "E2": "The key is not an Org Admin's or a Developer's."
                }
            },
            "post": {
                "operationId": "createWebhookEndpoint",
                "summary": "Create Webhook Endpoint",
                "description": "Adds an endpoint that Agilis will send events to. **The response includes `secret`, shown only this once:** store it safely and use it to check the `Agilis-Signature` header of every event. Up to 16 endpoints per mode. Org Admin and Developer API keys only; an Advertiser's key is refused (HTTP 403, `E2`). Endpoints belong to the organisation and to your key's mode: a TEST key sees TEST endpoints only.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#createWebhookEndpointSection"
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "description": "Where to send events: an `https://` address with a host name (not an IP address), on the standard port 443, that resolves to a public internet address. Up to 2,048 characters."
                                    },
                                    "enabled_events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "*",
                                                "offer.created",
                                                "offer.payment_succeeded",
                                                "offer.payment_failed",
                                                "offer.started",
                                                "offer.paused",
                                                "offer.resumed",
                                                "offer.ended",
                                                "offer.deleted",
                                                "offer.disabled",
                                                "offer.enabled",
                                                "event.published",
                                                "event.updated",
                                                "event.rescheduled",
                                                "event.cancelled",
                                                "event.deleted",
                                                "event.ended",
                                                "balance.topped_up",
                                                "balance.low",
                                                "invoice.created",
                                                "terms.version_issued"
                                            ]
                                        },
                                        "description": "The event types to send, or `[\"*\"]` for all, including types added later. See [Webhooks](https://www.agilis.dating/api-doc#webhooksSection) for the list."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Optional. What the endpoint is for, up to 255 characters."
                                    }
                                },
                                "required": [
                                    "url",
                                    "enabled_events"
                                ]
                            },
                            "example": {
                                "url": "https://hooks.example.com/agilis",
                                "enabled_events": [
                                    "offer.started",
                                    "offer.ended",
                                    "event.published"
                                ],
                                "description": "Order system"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "S1: Endpoint created. It starts receiving events straight away.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "enabled_events": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "livemode": {
                                            "type": "boolean"
                                        },
                                        "created": {
                                            "type": "string"
                                        },
                                        "last_success_at": {
                                            "description": "Can be null."
                                        },
                                        "failing_since": {
                                            "description": "Can be null."
                                        },
                                        "disabled_by": {
                                            "description": "Can be null."
                                        },
                                        "disabled_reason": {
                                            "description": "Can be null."
                                        },
                                        "previous_secret_expires_at": {
                                            "description": "Can be null."
                                        },
                                        "secret": {
                                            "type": "string",
                                            "description": "The signing secret, beginning `whsec_`. Shown only in this response and when rolled."
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                    "url": "https://hooks.example.com/agilis",
                                    "description": "Order system",
                                    "enabled_events": [
                                        "offer.started",
                                        "offer.ended",
                                        "event.published"
                                    ],
                                    "status": "enabled",
                                    "livemode": false,
                                    "created": "2027-09-20T10:00:00Z",
                                    "last_success_at": null,
                                    "failing_since": null,
                                    "disabled_by": null,
                                    "disabled_reason": null,
                                    "previous_secret_expires_at": null,
                                    "secret": "whsec_4mJ0c…"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "E1: Invalid `url`, `enabled_events` or `description`. The `message` says which.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "E4: Your organisation already has 16 endpoints in this mode. Delete one first.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Endpoint created. It starts receiving events straight away.",
                    "E1": "Invalid `url`, `enabled_events` or `description`. The `message` says which.",
                    "E2": "The key is not an Org Admin's or a Developer's.",
                    "E4": "Your organisation already has 16 endpoints in this mode. Delete one first."
                }
            }
        },
        "/webhook-endpoints/{endpoint_id}": {
            "get": {
                "operationId": "getWebhookEndpoint",
                "summary": "Get Webhook Endpoint",
                "description": "One endpoint, without its secret. `failing_since` is when deliveries to it started failing (`null` while they succeed); `disabled_by` is `business` when you turned it off, `system` when Agilis turned it off after 3 days of failures, or `agilis` when Agilis support did.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#getWebhookEndpointSection"
                },
                "parameters": [
                    {
                        "name": "endpoint_id",
                        "in": "path",
                        "required": true,
                        "description": "The endpoint id. Example: `we_01JD2X4Q7N8P9R0S1T2V3W4X5Y`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "S1: Endpoint returned.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "enabled_events": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "livemode": {
                                            "type": "boolean"
                                        },
                                        "created": {
                                            "type": "string"
                                        },
                                        "last_success_at": {
                                            "type": "string"
                                        },
                                        "failing_since": {
                                            "description": "Can be null."
                                        },
                                        "disabled_by": {
                                            "description": "Can be null."
                                        },
                                        "disabled_reason": {
                                            "description": "Can be null."
                                        },
                                        "previous_secret_expires_at": {
                                            "description": "Can be null."
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                    "url": "https://hooks.example.com/agilis",
                                    "description": "Order system",
                                    "enabled_events": [
                                        "offer.started",
                                        "offer.ended",
                                        "event.published"
                                    ],
                                    "status": "enabled",
                                    "livemode": false,
                                    "created": "2027-09-20T10:00:00Z",
                                    "last_success_at": "2027-09-21T08:15:02Z",
                                    "failing_since": null,
                                    "disabled_by": null,
                                    "disabled_reason": null,
                                    "previous_secret_expires_at": null
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Endpoint returned.",
                    "E2": "The key is not an Org Admin's or a Developer's.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            },
            "patch": {
                "operationId": "updateWebhookEndpoint",
                "summary": "Update Webhook Endpoint",
                "description": "Changes an endpoint. Send only what changes. Turning an endpoint back on (`enabled`) clears its failing state; events that stopped being retried while it was off are not sent again unless you resend them. An endpoint that Agilis support turned off can only be turned back on by Agilis support.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#updateWebhookEndpointSection"
                },
                "parameters": [
                    {
                        "name": "endpoint_id",
                        "in": "path",
                        "required": true,
                        "description": "The endpoint id. Example: `we_01JD2X4Q7N8P9R0S1T2V3W4X5Y`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "format": "uri",
                                        "description": "Where to send events: an `https://` address with a host name (not an IP address), on the standard port 443, that resolves to a public internet address. Up to 2,048 characters."
                                    },
                                    "enabled_events": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "*",
                                                "offer.created",
                                                "offer.payment_succeeded",
                                                "offer.payment_failed",
                                                "offer.started",
                                                "offer.paused",
                                                "offer.resumed",
                                                "offer.ended",
                                                "offer.deleted",
                                                "offer.disabled",
                                                "offer.enabled",
                                                "event.published",
                                                "event.updated",
                                                "event.rescheduled",
                                                "event.cancelled",
                                                "event.deleted",
                                                "event.ended",
                                                "balance.topped_up",
                                                "balance.low",
                                                "invoice.created",
                                                "terms.version_issued"
                                            ]
                                        },
                                        "description": "The event types to send, or `[\"*\"]` for all, including types added later. See [Webhooks](https://www.agilis.dating/api-doc#webhooksSection) for the list."
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Up to 255 characters, or `null` to clear it."
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "enabled",
                                            "disabled"
                                        ],
                                        "description": "`disabled` stops sending events to it; `enabled` starts again."
                                    }
                                }
                            },
                            "example": {
                                "enabled_events": [
                                    "*"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "S1: Endpoint updated.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "enabled_events": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "livemode": {
                                            "type": "boolean"
                                        },
                                        "created": {
                                            "type": "string"
                                        },
                                        "last_success_at": {
                                            "type": "string"
                                        },
                                        "failing_since": {
                                            "description": "Can be null."
                                        },
                                        "disabled_by": {
                                            "description": "Can be null."
                                        },
                                        "disabled_reason": {
                                            "description": "Can be null."
                                        },
                                        "previous_secret_expires_at": {
                                            "description": "Can be null."
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                    "url": "https://hooks.example.com/agilis",
                                    "description": "Order system",
                                    "enabled_events": [
                                        "*"
                                    ],
                                    "status": "enabled",
                                    "livemode": false,
                                    "created": "2027-09-20T10:00:00Z",
                                    "last_success_at": "2027-09-21T08:15:02Z",
                                    "failing_since": null,
                                    "disabled_by": null,
                                    "disabled_reason": null,
                                    "previous_secret_expires_at": null
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "E1: Invalid input. The `message` says which.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "E2: Agilis support turned this endpoint off. Contact help@agilis.dating.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Endpoint updated.",
                    "E1": "Invalid input. The `message` says which.",
                    "E2": "The key is not an Org Admin's or a Developer's. / Agilis support turned this endpoint off. Contact help@agilis.dating.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            },
            "delete": {
                "operationId": "deleteWebhookEndpoint",
                "summary": "Delete Webhook Endpoint",
                "description": "Deletes an endpoint. Nothing more is sent to it, including retries already scheduled. This cannot be undone.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#deleteWebhookEndpointSection"
                },
                "parameters": [
                    {
                        "name": "endpoint_id",
                        "in": "path",
                        "required": true,
                        "description": "The endpoint id. Example: `we_01JD2X4Q7N8P9R0S1T2V3W4X5Y`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "S1: Endpoint deleted.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "deleted": {
                                            "type": "boolean"
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                    "deleted": true
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Endpoint deleted.",
                    "E2": "The key is not an Org Admin's or a Developer's.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            }
        },
        "/webhook-endpoints/{endpoint_id}/roll-secret": {
            "post": {
                "operationId": "rollWebhookSecret",
                "summary": "Roll Webhook Secret",
                "description": "Replaces an endpoint's signing secret. **The new secret is in the response, shown only this once.** Until `expires_in` passes, every event is signed with both the new and the old secret (two `v1` values in `Agilis-Signature`), so you can update your server without missing any.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#rollWebhookSecretSection"
                },
                "parameters": [
                    {
                        "name": "endpoint_id",
                        "in": "path",
                        "required": true,
                        "description": "The endpoint id. Example: `we_01JD2X4Q7N8P9R0S1T2V3W4X5Y`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "expires_in": {
                                        "type": "string",
                                        "enum": [
                                            "now",
                                            "1h",
                                            "24h",
                                            "7d"
                                        ],
                                        "description": "How long the old secret keeps signing. Default `24h`. `now` stops it at once, for a secret that may have leaked."
                                    }
                                }
                            },
                            "example": {
                                "expires_in": "24h"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "S1: Secret replaced.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string"
                                        },
                                        "description": {
                                            "type": "string"
                                        },
                                        "enabled_events": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "livemode": {
                                            "type": "boolean"
                                        },
                                        "created": {
                                            "type": "string"
                                        },
                                        "last_success_at": {
                                            "type": "string"
                                        },
                                        "failing_since": {
                                            "description": "Can be null."
                                        },
                                        "disabled_by": {
                                            "description": "Can be null."
                                        },
                                        "disabled_reason": {
                                            "description": "Can be null."
                                        },
                                        "previous_secret_expires_at": {
                                            "type": "string"
                                        },
                                        "secret": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                    "url": "https://hooks.example.com/agilis",
                                    "description": "Order system",
                                    "enabled_events": [
                                        "offer.started",
                                        "offer.ended",
                                        "event.published"
                                    ],
                                    "status": "enabled",
                                    "livemode": false,
                                    "created": "2027-09-20T10:00:00Z",
                                    "last_success_at": "2027-09-21T08:15:02Z",
                                    "failing_since": null,
                                    "disabled_by": null,
                                    "disabled_reason": null,
                                    "previous_secret_expires_at": "2027-09-22T10:00:00Z",
                                    "secret": "whsec_9pQ2r…"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "E1: Invalid `expires_in`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Secret replaced.",
                    "E1": "Invalid `expires_in`.",
                    "E2": "The key is not an Org Admin's or a Developer's.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            }
        },
        "/webhook-endpoints/{endpoint_id}/test": {
            "post": {
                "operationId": "sendTestWebhook",
                "summary": "Send Test Webhook",
                "description": "Sends one sample event to the endpoint now, signed like any other, with `\"test\": true` in its body, and answers with the result. `data.object` is your organisation's latest Offer or Event in this mode, or `null` if there is none. A test event is never retried and never counts towards the endpoint failing.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#testWebhookEndpointSection"
                },
                "parameters": [
                    {
                        "name": "endpoint_id",
                        "in": "path",
                        "required": true,
                        "description": "The endpoint id. Example: `we_01JD2X4Q7N8P9R0S1T2V3W4X5Y`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "offer.created",
                                            "offer.payment_succeeded",
                                            "offer.payment_failed",
                                            "offer.started",
                                            "offer.paused",
                                            "offer.resumed",
                                            "offer.ended",
                                            "offer.deleted",
                                            "offer.disabled",
                                            "offer.enabled",
                                            "event.published",
                                            "event.updated",
                                            "event.rescheduled",
                                            "event.cancelled",
                                            "event.deleted",
                                            "event.ended",
                                            "balance.topped_up",
                                            "balance.low",
                                            "invoice.created",
                                            "terms.version_issued"
                                        ],
                                        "description": "The event type to send. Default `offer.created`."
                                    }
                                }
                            },
                            "example": {
                                "type": "offer.started"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "S1: Sent. `delivery.status` is `succeeded` when your server answered 2xx within 10 seconds, otherwise `failed` with `last_http_status` or `last_error`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "webhook_event_id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string"
                                        },
                                        "test": {
                                            "type": "boolean"
                                        },
                                        "delivery": {
                                            "type": "object",
                                            "properties": {
                                                "endpoint_id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "attempts": {
                                                    "type": "integer"
                                                },
                                                "last_http_status": {
                                                    "type": "integer"
                                                },
                                                "last_error": {
                                                    "description": "Can be null."
                                                },
                                                "next_attempt_at": {
                                                    "description": "Can be null."
                                                },
                                                "delivered_at": {
                                                    "type": "string"
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "webhook_event_id": "whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M",
                                    "type": "offer.started",
                                    "test": true,
                                    "delivery": {
                                        "endpoint_id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                        "status": "succeeded",
                                        "attempts": 1,
                                        "last_http_status": 200,
                                        "last_error": null,
                                        "next_attempt_at": null,
                                        "delivered_at": "2027-09-21T08:15:02Z"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "E1: Invalid `type`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "E2: The endpoint is turned off.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Sent. `delivery.status` is `succeeded` when your server answered 2xx within 10 seconds, otherwise `failed` with `last_http_status` or `last_error`.",
                    "E1": "Invalid `type`.",
                    "E2": "The key is not an Org Admin's or a Developer's. / The endpoint is turned off.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            }
        },
        "/webhook-events": {
            "get": {
                "operationId": "listWebhookEvents",
                "summary": "List Webhook Events",
                "description": "Webhook events of the last 30 days in your key's mode, newest first, each with its deliveries to your endpoints. Use it to find events your server missed. Org Admin and Developer API keys only; an Advertiser's key is refused (HTTP 403, `E2`). Endpoints belong to the organisation and to your key's mode: a TEST key sees TEST endpoints only.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#listWebhookEventsSection"
                },
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Only events of this type.",
                        "schema": {
                            "type": "string",
                            "enum": [
                                "offer.created",
                                "offer.payment_succeeded",
                                "offer.payment_failed",
                                "offer.started",
                                "offer.paused",
                                "offer.resumed",
                                "offer.ended",
                                "offer.deleted",
                                "offer.disabled",
                                "offer.enabled",
                                "event.published",
                                "event.updated",
                                "event.rescheduled",
                                "event.cancelled",
                                "event.deleted",
                                "event.ended",
                                "balance.topped_up",
                                "balance.low",
                                "invoice.created",
                                "terms.version_issued"
                            ]
                        }
                    },
                    {
                        "name": "delivery_success",
                        "in": "query",
                        "required": false,
                        "description": "`false`: only events not yet delivered to every endpoint. `true`: only events delivered everywhere.",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Page size, 1 to 100. Default 20.",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "description": "The `next_cursor` of the previous page.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "S1: Events returned.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "created": {
                                                        "type": "integer"
                                                    },
                                                    "livemode": {
                                                        "type": "boolean"
                                                    },
                                                    "test": {
                                                        "type": "boolean"
                                                    },
                                                    "data": {
                                                        "type": "object",
                                                        "properties": {
                                                            "object": {
                                                                "$ref": "#/components/schemas/Offer"
                                                            }
                                                        }
                                                    },
                                                    "request": {
                                                        "type": "object",
                                                        "properties": {
                                                            "source": {
                                                                "type": "string"
                                                            },
                                                            "idempotency_key": {
                                                                "description": "Can be null."
                                                            }
                                                        }
                                                    },
                                                    "deliveries": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "endpoint_id": {
                                                                    "type": "string"
                                                                },
                                                                "status": {
                                                                    "type": "string"
                                                                },
                                                                "attempts": {
                                                                    "type": "integer"
                                                                },
                                                                "last_http_status": {
                                                                    "type": "integer"
                                                                },
                                                                "last_error": {
                                                                    "description": "Can be null."
                                                                },
                                                                "next_attempt_at": {
                                                                    "type": "string"
                                                                },
                                                                "delivered_at": {
                                                                    "description": "Can be null."
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        },
                                        "pagination": {
                                            "$ref": "#/components/schemas/Page"
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "data": [
                                        {
                                            "id": "whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M",
                                            "type": "offer.started",
                                            "created": 1821341702,
                                            "livemode": false,
                                            "test": false,
                                            "data": {
                                                "object": {
                                                    "offer_id": 45,
                                                    "title": "20% off summer sale",
                                                    "category": "Retail",
                                                    "description": "Discount valid through July",
                                                    "terms_and_conditions": "Valid online only.",
                                                    "advertised_name": null,
                                                    "push_notification_title": "20% off this summer",
                                                    "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                                    "button_preset": "claim_offer",
                                                    "button_text": null,
                                                    "url": "https://advertiseroffer.com",
                                                    "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                                    "latitude": 51.5074,
                                                    "longitude": -0.1278,
                                                    "radius": 10,
                                                    "gender": [
                                                        "Male",
                                                        "Female"
                                                    ],
                                                    "interests": [
                                                        {
                                                            "interest_id": 3,
                                                            "interest_name": "Cooking"
                                                        },
                                                        {
                                                            "interest_id": 7,
                                                            "interest_name": "Fitness"
                                                        }
                                                    ],
                                                    "start_datetime": "2027-07-10T08:00:00Z",
                                                    "expiry_datetime": "2027-07-12T20:30:00Z",
                                                    "creation_datetime": "2027-06-01T10:00:00Z",
                                                    "offer_status": "Active",
                                                    "status": "enabled"
                                                }
                                            },
                                            "request": {
                                                "source": "system",
                                                "idempotency_key": null
                                            },
                                            "deliveries": [
                                                {
                                                    "endpoint_id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                                    "status": "pending",
                                                    "attempts": 2,
                                                    "last_http_status": 503,
                                                    "last_error": null,
                                                    "next_attempt_at": "2027-09-21T08:45:00Z",
                                                    "delivered_at": null
                                                }
                                            ]
                                        }
                                    ],
                                    "pagination": {
                                        "limit": 20,
                                        "count": 1,
                                        "has_more": false,
                                        "next_cursor": null
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "E1: Invalid filter, `limit` or `cursor`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Events returned.",
                    "E1": "Invalid filter, `limit` or `cursor`.",
                    "E2": "The key is not an Org Admin's or a Developer's."
                }
            }
        },
        "/webhook-events/{webhook_event_id}": {
            "get": {
                "operationId": "getWebhookEvent",
                "summary": "Get Webhook Event",
                "description": "One webhook event: what was sent, and each delivery's status, attempts and last result.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#getWebhookEventSection"
                },
                "parameters": [
                    {
                        "name": "webhook_event_id",
                        "in": "path",
                        "required": true,
                        "description": "The webhook event id. Example: `whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "S1: Event returned.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "id": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string"
                                        },
                                        "created": {
                                            "type": "integer"
                                        },
                                        "livemode": {
                                            "type": "boolean"
                                        },
                                        "test": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "object": {
                                                    "$ref": "#/components/schemas/Offer"
                                                }
                                            }
                                        },
                                        "request": {
                                            "type": "object",
                                            "properties": {
                                                "source": {
                                                    "type": "string"
                                                },
                                                "idempotency_key": {
                                                    "description": "Can be null."
                                                }
                                            }
                                        },
                                        "deliveries": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "endpoint_id": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "attempts": {
                                                        "type": "integer"
                                                    },
                                                    "last_http_status": {
                                                        "type": "integer"
                                                    },
                                                    "last_error": {
                                                        "description": "Can be null."
                                                    },
                                                    "next_attempt_at": {
                                                        "description": "Can be null."
                                                    },
                                                    "delivered_at": {
                                                        "type": "string"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "id": "whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M",
                                    "type": "offer.started",
                                    "created": 1821341702,
                                    "livemode": false,
                                    "test": false,
                                    "data": {
                                        "object": {
                                            "offer_id": 45,
                                            "title": "20% off summer sale",
                                            "category": "Retail",
                                            "description": "Discount valid through July",
                                            "terms_and_conditions": "Valid online only.",
                                            "advertised_name": null,
                                            "push_notification_title": "20% off this summer",
                                            "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                            "button_preset": "claim_offer",
                                            "button_text": null,
                                            "url": "https://advertiseroffer.com",
                                            "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                            "latitude": 51.5074,
                                            "longitude": -0.1278,
                                            "radius": 10,
                                            "gender": [
                                                "Male",
                                                "Female"
                                            ],
                                            "interests": [
                                                {
                                                    "interest_id": 3,
                                                    "interest_name": "Cooking"
                                                },
                                                {
                                                    "interest_id": 7,
                                                    "interest_name": "Fitness"
                                                }
                                            ],
                                            "start_datetime": "2027-07-10T08:00:00Z",
                                            "expiry_datetime": "2027-07-12T20:30:00Z",
                                            "creation_datetime": "2027-06-01T10:00:00Z",
                                            "offer_status": "Active",
                                            "status": "enabled"
                                        }
                                    },
                                    "request": {
                                        "source": "system",
                                        "idempotency_key": null
                                    },
                                    "deliveries": [
                                        {
                                            "endpoint_id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                            "status": "succeeded",
                                            "attempts": 1,
                                            "last_http_status": 200,
                                            "last_error": null,
                                            "next_attempt_at": null,
                                            "delivered_at": "2027-09-21T08:15:02Z"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Event returned.",
                    "E2": "The key is not an Org Admin's or a Developer's.",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            }
        },
        "/webhook-events/{webhook_event_id}/resend": {
            "post": {
                "operationId": "resendWebhookEvent",
                "summary": "Resend Webhook Event",
                "description": "Sends an event again now, exactly as first sent (same `id`, so your server can recognise a repeat), to one endpoint or to every endpoint it went to. Events can be resent for 15 days. Endpoints that are turned off are skipped.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#resendWebhookEventSection"
                },
                "parameters": [
                    {
                        "name": "webhook_event_id",
                        "in": "path",
                        "required": true,
                        "description": "The webhook event id. Example: `whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M`",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "endpoint_id": {
                                        "type": "string",
                                        "description": "Send to this endpoint only, including one the event did not go to at first. Omit to send to every endpoint it went to."
                                    }
                                }
                            },
                            "example": {
                                "endpoint_id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "S1: Sent. `deliveries` has each result.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "return_code": {
                                            "type": "string"
                                        },
                                        "webhook_event_id": {
                                            "type": "string"
                                        },
                                        "deliveries": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "endpoint_id": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "attempts": {
                                                        "type": "integer"
                                                    },
                                                    "last_http_status": {
                                                        "type": "integer"
                                                    },
                                                    "last_error": {
                                                        "description": "Can be null."
                                                    },
                                                    "next_attempt_at": {
                                                        "description": "Can be null."
                                                    },
                                                    "delivered_at": {
                                                        "type": "string"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "return_code": "S1",
                                    "webhook_event_id": "whevt_01JD2Y8B3C4D5E6F7G8H9J0K1M",
                                    "deliveries": [
                                        {
                                            "endpoint_id": "we_01JD2X4Q7N8P9R0S1T2V3W4X5Y",
                                            "status": "succeeded",
                                            "attempts": 3,
                                            "last_http_status": 200,
                                            "last_error": null,
                                            "next_attempt_at": null,
                                            "delivered_at": "2027-09-21T08:15:02Z"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Invalid or missing API key, or a disabled account. Every bad key gets the same 401.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "E2: The key is not an Org Admin's or a Developer's.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "E3: Not found in this organisation and mode (HTTP 404).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "E2: The event is more than 15 days old, is still being sent for the first time, or went to no endpoint (give `endpoint_id`).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded (60 requests a minute per API key, or repeated invalid keys): wait for the number of seconds in Retry-After.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ReturnCode"
                                }
                            }
                        },
                        "headers": {
                            "Retry-After": {
                                "description": "Seconds to wait. Sent when the per-key limit or the invalid-key limit is reached.",
                                "schema": {
                                    "type": "integer"
                                }
                            }
                        }
                    }
                },
                "x-return-codes": {
                    "S1": "Sent. `deliveries` has each result.",
                    "E2": "The key is not an Org Admin's or a Developer's. / The event is more than 15 days old, is still being sent for the first time, or went to no endpoint (give `endpoint_id`).",
                    "E3": "Not found in this organisation and mode (HTTP 404)."
                }
            }
        }
    },
    "webhooks": {
        "offer.created": {
            "post": {
                "operationId": "offerCreatedWebhook",
                "summary": "offer.created",
                "description": "An Offer was created: paid from your balance at once, or awaiting a card payment.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.created` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.created"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "payment_method": {
                                                "type": "string",
                                                "enum": [
                                                    "B",
                                                    "E"
                                                ],
                                                "description": "B: paid from your balance. E: awaiting payment by Stripe link."
                                            },
                                            "amount_charged": {
                                                "type": "number",
                                                "description": "What was deducted from your balance (payment_method B only)."
                                            },
                                            "amount_due": {
                                                "type": "number",
                                                "description": "What the payment link asks for, before any VAT (payment_method E only)."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.created",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "payment_method": "B",
                                    "amount_charged": 12.5,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": "6f1c2a9e-0b7d-4c55-9a51-3d2f8e7b1c04"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.payment_succeeded": {
            "post": {
                "operationId": "offerPaymentSucceededWebhook",
                "summary": "offer.payment_succeeded",
                "description": "The card payment for an Offer created with payment_method E completed.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.payment_succeeded` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.payment_succeeded"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "amount_paid": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ],
                                                "description": "The amount paid."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.payment_succeeded",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "amount_paid": 12.5,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.payment_failed": {
            "post": {
                "operationId": "offerPaymentFailedWebhook",
                "summary": "offer.payment_failed",
                "description": "The card payment for an Offer was declined or failed, or its payment link expired. The Offer stays Awaiting Payment.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.payment_failed` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.payment_failed"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "reason": {
                                                "type": "string",
                                                "enum": [
                                                    "declined",
                                                    "failed",
                                                    "expired"
                                                ],
                                                "description": "declined: the card was declined (the payer can try again); failed: the payment failed; expired: the payment link expired."
                                            },
                                            "amount_due": {
                                                "type": [
                                                    "number",
                                                    "null"
                                                ],
                                                "description": "The amount that was due."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.payment_failed",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "reason": "declined",
                                    "amount_due": 12.5,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.started": {
            "post": {
                "operationId": "offerStartedWebhook",
                "summary": "offer.started",
                "description": "An Offer became visible to members: at once, or at its scheduled start.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.started` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.started"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.started",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    }
                                },
                                "request": {
                                    "source": "system",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.paused": {
            "post": {
                "operationId": "offerPausedWebhook",
                "summary": "offer.paused",
                "description": "An Offer was paused, by your organisation or by Agilis.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.paused` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.paused"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "paused_by": {
                                                "type": "string",
                                                "enum": [
                                                    "business",
                                                    "agilis"
                                                ],
                                                "description": "Who paused it: your organisation, or Agilis."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.paused",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "paused_by": "business"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.resumed": {
            "post": {
                "operationId": "offerResumedWebhook",
                "summary": "offer.resumed",
                "description": "A paused Offer was resumed.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.resumed` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.resumed"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "resumed_by": {
                                                "type": "string",
                                                "enum": [
                                                    "business",
                                                    "agilis"
                                                ],
                                                "description": "Who resumed it: your organisation, or Agilis."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.resumed",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "resumed_by": "business"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.ended": {
            "post": {
                "operationId": "offerEndedWebhook",
                "summary": "offer.ended",
                "description": "An Offer's time is up. Any unused time is credited to your balance.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.ended` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.ended"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "unused_time_credited": {
                                                "type": "number",
                                                "description": "Credited to your balance for time the Offer did not run (0 if none)."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.ended",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "unused_time_credited": 0,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "system",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.deleted": {
            "post": {
                "operationId": "offerDeletedWebhook",
                "summary": "offer.deleted",
                "description": "An Offer was deleted. Any unused time is credited to your balance.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.deleted` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.deleted"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            },
                                            "unused_time_credited": {
                                                "type": "number",
                                                "description": "Credited to your balance for time the Offer did not run (0 if none)."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.deleted",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    },
                                    "unused_time_credited": 1.25,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.disabled": {
            "post": {
                "operationId": "offerDisabledWebhook",
                "summary": "offer.disabled",
                "description": "Agilis took an Offer off members' feeds. Your Org Admins are told why by email.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.disabled` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.disabled"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.disabled",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    }
                                },
                                "request": {
                                    "source": "agilis",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "offer.enabled": {
            "post": {
                "operationId": "offerEnabledWebhook",
                "summary": "offer.enabled",
                "description": "Agilis put a disabled Offer back on members' feeds.\n\nSent as an HTTPS POST to each of your endpoints that listens for `offer.enabled` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "offer.enabled"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Offer",
                                                "description": "The Offer, in the same shape as an item of GET /offers."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "offer.enabled",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "offer_id": 45,
                                        "title": "20% off summer sale",
                                        "category": "Retail",
                                        "description": "Discount valid through July",
                                        "terms_and_conditions": "Valid online only.",
                                        "advertised_name": null,
                                        "push_notification_title": "20% off this summer",
                                        "push_notification_message": "Show this at the till for 20% off everything until the end of July.",
                                        "button_preset": "claim_offer",
                                        "button_text": null,
                                        "url": "https://advertiseroffer.com",
                                        "image": "https://ads.agilis.dating/92/offers/45/offer_orig.png",
                                        "latitude": 51.5074,
                                        "longitude": -0.1278,
                                        "radius": 10,
                                        "gender": [
                                            "Male",
                                            "Female"
                                        ],
                                        "interests": [
                                            {
                                                "interest_id": 3,
                                                "interest_name": "Cooking"
                                            },
                                            {
                                                "interest_id": 7,
                                                "interest_name": "Fitness"
                                            }
                                        ],
                                        "start_datetime": "2027-07-10T08:00:00Z",
                                        "expiry_datetime": "2027-07-12T20:30:00Z",
                                        "creation_datetime": "2027-06-01T10:00:00Z",
                                        "offer_status": "Active",
                                        "status": "enabled"
                                    }
                                },
                                "request": {
                                    "source": "agilis",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.published": {
            "post": {
                "operationId": "eventPublishedWebhook",
                "summary": "event.published",
                "description": "An Event was published.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.published` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.published"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            },
                                            "amount_charged": {
                                                "type": "number",
                                                "description": "The listing fee taken from your balance (0 for a TEST event)."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.published",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    },
                                    "amount_charged": 10,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": "6f1c2a9e-0b7d-4c55-9a51-3d2f8e7b1c04"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.updated": {
            "post": {
                "operationId": "eventUpdatedWebhook",
                "summary": "event.updated",
                "description": "An Event's details, image or crop changed.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.updated` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.updated"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            },
                                            "changed_fields": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                },
                                                "description": "The fields that changed."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.updated",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    },
                                    "changed_fields": [
                                        "title",
                                        "image"
                                    ]
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.rescheduled": {
            "post": {
                "operationId": "eventRescheduledWebhook",
                "summary": "event.rescheduled",
                "description": "An Event moved to new dates.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.rescheduled` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.rescheduled"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            },
                                            "reschedule_count": {
                                                "type": "integer",
                                                "description": "How many times it has been rescheduled."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.rescheduled",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    },
                                    "reschedule_count": 1
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.cancelled": {
            "post": {
                "operationId": "eventCancelledWebhook",
                "summary": "event.cancelled",
                "description": "An Event was cancelled.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.cancelled` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.cancelled"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.cancelled",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    }
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.deleted": {
            "post": {
                "operationId": "eventDeletedWebhook",
                "summary": "event.deleted",
                "description": "An Event was deleted.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.deleted` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.deleted"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.deleted",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    }
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "event.ended": {
            "post": {
                "operationId": "eventEndedWebhook",
                "summary": "event.ended",
                "description": "An Event's end time passed.\n\nSent as an HTTPS POST to each of your endpoints that listens for `event.ended` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "event.ended"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "$ref": "#/components/schemas/Event",
                                                "description": "The Event, in the same shape as an item of GET /events."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "event.ended",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "event_id": 3104,
                                        "title": "Beginners Cuban Salsa: Friday Social",
                                        "description": "Drop-in class for absolute beginners, followed by a social until late. No partner needed.",
                                        "category": {
                                            "category_id": 9,
                                            "category_name": "Classes & workshops"
                                        },
                                        "venue_name": "Bar Salsa",
                                        "address": "96 Charing Cross Road",
                                        "city": "London",
                                        "country_code": "GB",
                                        "latitude": 51.5133,
                                        "longitude": -0.13,
                                        "starts_at": "2027-10-16T18:30:00Z",
                                        "ends_at": "2027-10-16T23:00:00Z",
                                        "url": "https://www.barsalsa.co.uk/classes/friday",
                                        "advertised_name": null,
                                        "price_min": 12,
                                        "price_max": 12,
                                        "currency": "GBP",
                                        "image": "https://cdn.agilis.dating/92/events/5f0c…/event_orig.jpg",
                                        "image_large": "https://cdn.agilis.dating/92/events/5f0c…/event_large.jpg",
                                        "image_thumb": "https://cdn.agilis.dating/92/events/5f0c…/event_thumb.jpg",
                                        "event_status": "Scheduled",
                                        "attendees": "10-25",
                                        "owner": {
                                            "user_id": 41,
                                            "name": "Tom Reid"
                                        },
                                        "environment": "LIVE",
                                        "reschedule_count": 0,
                                        "cloned_from_event_id": null,
                                        "creation_datetime": "2027-09-20T10:00:00Z",
                                        "last_edited_at": null
                                    }
                                },
                                "request": {
                                    "source": "system",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "balance.topped_up": {
            "post": {
                "operationId": "balanceToppedUpWebhook",
                "summary": "balance.topped_up",
                "description": "A top-up was credited to your balance.\n\nSent as an HTTPS POST to each of your endpoints that listens for `balance.topped_up` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "balance.topped_up"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "type": "null"
                                            },
                                            "amount_added": {
                                                "type": "number",
                                                "description": "Added to your balance, promotional credit included."
                                            },
                                            "of_which_promo_credit": {
                                                "type": "number",
                                                "description": "The part of amount_added that is promotional credit."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            },
                                            "balance": {
                                                "type": "number",
                                                "description": "Your Organisation balance (everyone's balances added together) after the top-up."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "balance.topped_up",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": null,
                                    "amount_added": 110,
                                    "of_which_promo_credit": 10,
                                    "currency": "GBP",
                                    "balance": 152.1
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "balance.low": {
            "post": {
                "operationId": "balanceLowWebhook",
                "summary": "balance.low",
                "description": "Your Organisation balance (everyone's balances added together) fell below the low balance alert amount an Org Admin set in Settings. Sent once until the balance is back at or above that amount.\n\nSent as an HTTPS POST to each of your endpoints that listens for `balance.low` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "balance.low"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "type": "null"
                                            },
                                            "balance": {
                                                "type": "number",
                                                "description": "Your Organisation balance (everyone's balances added together) now."
                                            },
                                            "alert_amount": {
                                                "type": "number",
                                                "description": "The alert amount set in Settings."
                                            },
                                            "currency": {
                                                "type": "string",
                                                "description": "ISO 4217 code of the amounts, your billing currency. Example: GBP"
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "balance.low",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": null,
                                    "balance": 42.1,
                                    "alert_amount": 50,
                                    "currency": "GBP"
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "invoice.created": {
            "post": {
                "operationId": "invoiceCreatedWebhook",
                "summary": "invoice.created",
                "description": "An invoice was issued: for an Offer, an Event or a top-up.\n\nSent as an HTTPS POST to each of your endpoints that listens for `invoice.created` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "invoice.created"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "type": "object",
                                                "description": "The invoice. Download it from the Ad Portal's Invoices page.",
                                                "properties": {
                                                    "invoice_number": {
                                                        "type": "string"
                                                    },
                                                    "invoice_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date-time"
                                                    },
                                                    "for": {
                                                        "type": "string",
                                                        "enum": [
                                                            "offer",
                                                            "event",
                                                            "top_up"
                                                        ]
                                                    },
                                                    "offer_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "event_id": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "amount": {
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ],
                                                        "description": "Excluding VAT."
                                                    },
                                                    "currency": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ad_portal_url": {
                                                        "type": "string",
                                                        "format": "uri"
                                                    }
                                                }
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "invoice.created",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": {
                                        "invoice_number": "INV-2027-1047",
                                        "invoice_date": "2027-07-10T08:00:12Z",
                                        "for": "offer",
                                        "offer_id": 45,
                                        "event_id": null,
                                        "amount": 12.5,
                                        "currency": "GBP",
                                        "ad_portal_url": "https://adportal.agilis.dating/invoice"
                                    }
                                },
                                "request": {
                                    "source": "api",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        },
        "terms.version_issued": {
            "post": {
                "operationId": "termsVersionIssuedWebhook",
                "summary": "terms.version_issued",
                "description": "Agilis issued a new version of the Advertising Terms. An Org Admin must accept it before your organisation can create Offers or publish Events again, through the API too.\n\nSent as an HTTPS POST to each of your endpoints that listens for `terms.version_issued` (or `*`). Verify the `Agilis-Signature` header before trusting the body, and answer with any 2xx within 10 seconds. Ignore an `id` you have already handled: retries and resends repeat it.",
                "tags": [
                    "Webhooks"
                ],
                "externalDocs": {
                    "url": "https://www.agilis.dating/api-doc#webhooksSection"
                },
                "security": [],
                "parameters": [
                    {
                        "name": "Agilis-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<Unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with your endpoint secret>`. While a rolled secret is still valid there is one `v1` per secret: accept the message if any matches. Reject a `t` more than 5 minutes from now.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "t=1795075200,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
                    },
                    {
                        "name": "Agilis-Webhook-Id",
                        "in": "header",
                        "required": true,
                        "description": "The webhook event id, the same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "id",
                                    "object",
                                    "type",
                                    "created",
                                    "livemode",
                                    "version",
                                    "data",
                                    "request"
                                ],
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Unique id of this webhook event (whevt_…). The same on every retry and resend: use it to ignore duplicates."
                                    },
                                    "object": {
                                        "type": "string",
                                        "const": "webhook_event"
                                    },
                                    "type": {
                                        "type": "string",
                                        "const": "terms.version_issued"
                                    },
                                    "created": {
                                        "type": "integer",
                                        "description": "When the change happened, in Unix seconds. Events can arrive out of order: use this to order them."
                                    },
                                    "livemode": {
                                        "type": "boolean",
                                        "description": "true for a LIVE endpoint, false for TEST."
                                    },
                                    "version": {
                                        "type": "integer",
                                        "const": 1,
                                        "description": "Payload version."
                                    },
                                    "test": {
                                        "type": "boolean",
                                        "description": "Present and true only on a message sent with Send test event."
                                    },
                                    "data": {
                                        "type": "object",
                                        "required": [
                                            "object"
                                        ],
                                        "properties": {
                                            "object": {
                                                "type": "null"
                                            },
                                            "version": {
                                                "type": "string",
                                                "description": "The version label."
                                            },
                                            "issued_at": {
                                                "type": "string",
                                                "format": "date-time",
                                                "description": "When it was issued (UTC)."
                                            },
                                            "url": {
                                                "type": "string",
                                                "format": "uri",
                                                "description": "Where to read them."
                                            },
                                            "accept_url": {
                                                "type": "string",
                                                "format": "uri",
                                                "description": "Where an Org Admin accepts them."
                                            },
                                            "acceptance_needed_to_create": {
                                                "type": "boolean",
                                                "description": "Always true: creating Offers and Events waits for acceptance."
                                            }
                                        }
                                    },
                                    "request": {
                                        "type": "object",
                                        "properties": {
                                            "source": {
                                                "type": "string",
                                                "enum": [
                                                    "api",
                                                    "mcp",
                                                    "ad_portal",
                                                    "agilis",
                                                    "system"
                                                ],
                                                "description": "What caused the change: your API key, the MCP server, the Ad Portal, Agilis, or the system (a scheduled start or end)."
                                            },
                                            "idempotency_key": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "description": "The Idempotency-Key of the request that caused it, if any."
                                            }
                                        }
                                    }
                                }
                            },
                            "example": {
                                "id": "whevt_01JD0S6Q4M8K1Z0X7C2V9B3N5R",
                                "object": "webhook_event",
                                "type": "terms.version_issued",
                                "created": 1795075200,
                                "livemode": true,
                                "version": 1,
                                "data": {
                                    "object": null,
                                    "version": "2027-01",
                                    "issued_at": "2027-01-04T09:00:00Z",
                                    "url": "https://www.agilis.dating/business/terms",
                                    "accept_url": "https://adportal.agilis.dating/terms",
                                    "acceptance_needed_to_create": true
                                },
                                "request": {
                                    "source": "agilis",
                                    "idempotency_key": null
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any 2xx status within 10 seconds means received. The response body is ignored."
                    },
                    "default": {
                        "description": "Anything else, a redirect or no answer within 10 seconds is a failed attempt, retried later."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "apiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "x-api-key",
                "description": "Created in the Ad Portal under Manage API Keys. Shown once; Roll key replaces a lost one. One key per mode (TEST or LIVE)."
            }
        },
        "schemas": {
            "Offer": {
                "type": "object",
                "description": "An Offer: a time-limited deal shown to Agilis members near the business, in the mode of the API key that reads it.",
                "properties": {
                    "offer_id": {
                        "type": "integer",
                        "description": "The offer's id."
                    },
                    "title": {
                        "type": "string",
                        "description": "As created."
                    },
                    "category": {
                        "type": "string",
                        "description": "As created."
                    },
                    "description": {
                        "type": "string",
                        "description": "As created."
                    },
                    "terms_and_conditions": {
                        "type": "string",
                        "description": "As created."
                    },
                    "advertised_name": {
                        "description": "The business name members see; `null` when your trading name is shown."
                    },
                    "push_notification_title": {
                        "type": "string",
                        "description": "The notification members who opted in get when the offer starts. `null` on offers created before these fields existed: those offers are never sent as a notification."
                    },
                    "push_notification_message": {
                        "type": "string",
                        "description": "The notification members who opted in get when the offer starts. `null` on offers created before these fields existed: those offers are never sent as a notification."
                    },
                    "button_preset": {
                        "type": "string",
                        "description": "The button's text: `claim_offer`, `visit_website`, `install_app`, `book_now`, `get_directions` or `custom`. `claim_offer` on offers created before the button text could be chosen."
                    },
                    "button_text": {
                        "description": "Your own button text when `button_preset` is `custom`; otherwise `null`."
                    },
                    "url": {
                        "type": "string",
                        "description": "As created."
                    },
                    "image": {
                        "type": "string",
                        "description": "Signed URL of the image. It expires, so do not store it."
                    },
                    "latitude": {
                        "type": "number",
                        "description": "Where the offer is shown."
                    },
                    "longitude": {
                        "type": "number",
                        "description": "Where the offer is shown."
                    },
                    "radius": {
                        "type": "integer",
                        "description": "Where the offer is shown."
                    },
                    "gender": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        },
                        "description": "For example `[\"Male\",\"Female\"]`; empty when the offer targets every gender."
                    },
                    "interests": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Interest"
                        },
                        "description": "`{interest_id, interest_name}` objects; empty when no interest targeting was applied."
                    },
                    "start_datetime": {
                        "type": "string",
                        "description": "ISO 8601, UTC."
                    },
                    "expiry_datetime": {
                        "type": "string",
                        "description": "ISO 8601, UTC."
                    },
                    "creation_datetime": {
                        "type": "string",
                        "description": "ISO 8601, UTC."
                    },
                    "offer_status": {
                        "type": "string",
                        "description": "Awaiting Payment, Active, Scheduled, Paused or Ended."
                    },
                    "status": {
                        "type": "string",
                        "description": "`enabled` or `disabled`: whether an Admin has disabled the offer."
                    }
                }
            },
            "Event": {
                "type": "object",
                "description": "An Event listing shown in the Events tab of the Agilis apps, in the mode of the API key that reads it.",
                "properties": {
                    "event_id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "category": {
                        "$ref": "#/components/schemas/Category"
                    },
                    "venue_name": {
                        "type": "string"
                    },
                    "address": {
                        "type": "string"
                    },
                    "city": {
                        "type": "string"
                    },
                    "country_code": {
                        "type": "string"
                    },
                    "latitude": {
                        "type": "number"
                    },
                    "longitude": {
                        "type": "number"
                    },
                    "starts_at": {
                        "type": "string"
                    },
                    "ends_at": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "advertised_name": {
                        "description": "Can be null."
                    },
                    "price_min": {
                        "type": "integer"
                    },
                    "price_max": {
                        "type": "integer"
                    },
                    "currency": {
                        "type": "string"
                    },
                    "image": {
                        "type": "string"
                    },
                    "image_large": {
                        "type": "string"
                    },
                    "image_thumb": {
                        "type": "string"
                    },
                    "event_status": {
                        "type": "string"
                    },
                    "attendees": {
                        "type": "string"
                    },
                    "owner": {
                        "type": "object"
                    },
                    "environment": {
                        "type": "string"
                    },
                    "reschedule_count": {
                        "type": "integer"
                    },
                    "cloned_from_event_id": {
                        "description": "Can be null."
                    },
                    "creation_datetime": {
                        "type": "string"
                    },
                    "last_edited_at": {
                        "description": "Can be null."
                    }
                }
            },
            "Category": {
                "type": "object",
                "description": "An Offer category, or an Event category.",
                "properties": {
                    "category_id": {
                        "type": "integer",
                        "description": "Unique ID of the category. Example: `1`"
                    },
                    "category_name": {
                        "type": "string",
                        "description": "Name of the category. Example: `\"Retail\"`"
                    }
                }
            },
            "Interest": {
                "type": "object",
                "description": "An interest that an Offer can target.",
                "properties": {
                    "interest_id": {
                        "type": "integer",
                        "description": "Unique ID of the interest. Example: `3`"
                    },
                    "interest_name": {
                        "type": "string",
                        "description": "Name of the interest. Example: `\"Cooking\"`"
                    }
                }
            },
            "Page": {
                "type": "object",
                "description": "Where a list response is in the whole list: the page size, how many items this page has, and the cursor for the next page.",
                "properties": {
                    "limit": {
                        "type": "integer",
                        "description": "The page size asked for (default 20, at most 100)."
                    },
                    "count": {
                        "type": "integer",
                        "description": "How many items this page has."
                    },
                    "has_more": {
                        "type": "boolean",
                        "description": "Whether there is another page."
                    },
                    "next_cursor": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Pass as `cursor` to get the next page; null on the last page."
                    }
                }
            },
            "ReturnCode": {
                "type": "object",
                "description": "The body of an error response: a return code, scoped to the endpoint, and a message.",
                "properties": {
                    "return_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "S1/S2 on success, E1–E16 on error. The meaning depends on the endpoint: see its x-return-codes."
                    },
                    "message": {
                        "type": "string",
                        "description": "What went wrong, in English."
                    }
                }
            }
        }
    }
}