{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/elocuenti-com/json-schema/elocuenti-com-webhook-update-body-schema.json",
  "title": "WebhookUpdateBody",
  "description": "What to change. Send at least one field; the ones you leave out stay as they are. The signing secret never changes here: rotate it with `POST /api/v1/webhooks/{id}/rotate-secret`.",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/elocuenti-com-openapi.json#/components/schemas/WebhookUpdateBody",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048,
      "pattern": "^https:\\/\\/[^\\s]+$",
      "description": "The address that receives the events: `https`, up to 2048 characters, on a public server (a private or unresolvable address is refused). Put no secret in it: the signature tells you a request is ours. An address can be used once per environment (a developer is only told about the ones they created).",
      "title": "Url"
    },
    "events": {
      "minItems": 1,
      "maxItems": 14,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "message.received",
          "message.status",
          "conversation.opened",
          "conversation.closed",
          "conversation.assigned",
          "conversation.escalated",
          "ai.paused",
          "ai.resumed",
          "contact.created",
          "contact.updated",
          "stage.changed",
          "lead.captured",
          "call.completed",
          "charge.status"
        ]
      },
      "description": "The events to receive, at least one: `message.received`, `message.status`, `conversation.opened`, `conversation.closed`, `conversation.assigned`, `conversation.escalated`, `ai.paused`, `ai.resumed`, `contact.created`, `contact.updated`, `stage.changed`, `lead.captured`, `call.completed`, `charge.status`. Each name once.",
      "title": "Events"
    },
    "include_message_content": {
      "type": "boolean",
      "description": "`true`: `message.received` carries the message's text in `data.content` (`false`, the default: only identifiers; `message.status` never carries text). It is the text of every message of the business, so it needs a key with `conversations:read` and a subscription created by an owner or an administrator (otherwise `403 webhook_content_not_allowed`). When each event is sent we check again the role of the subscription's creator, not the key's permission, so a change reaches the next event: if they stop being an owner or an administrator the text stops, and `message_content_active` says so.",
      "title": "Include Message Content"
    },
    "include_campaign_messages": {
      "type": "boolean",
      "description": "`true`: `message.status` is also sent for your campaigns' messages. `false` (the default): only for the messages you send through the API, so a large campaign does not flood your address. A change applies to the events queued from then on.",
      "title": "Include Campaign Messages"
    },
    "status": {
      "description": "`paused`: no event is sent until you turn it back on. `active`: events are sent; it also turns on a subscription that we switched off after days of failures, and starts its count of failures again.",
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "title": "Status"
    }
  },
  "additionalProperties": false
}