{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sendraven-ai/json-schema/sendraven-ai-webhook-endpoint-with-secret-schema.json",
  "title": "WebhookEndpointWithSecret",
  "description": "The endpoint as created, with its signing secret: the only response that ever carries it.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sendraven-ai-webhook-endpoints-api-openapi.yml#/components/schemas/WebhookEndpointWithSecret",
  "type": "object",
  "required": [
    "id",
    "url",
    "events",
    "enabled",
    "created_at",
    "secret"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "url": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "inbound",
          "send",
          "delivery",
          "bounce",
          "complaint",
          "reject",
          "open",
          "click",
          "rendering_failure",
          "delivery_delay",
          "unsubscribe"
        ]
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "secret": {
      "type": "string",
      "description": "Starts whsec_. Signs every delivery in the X-CN-Signature header (t=<unix>,v1=<hex HMAC-SHA256 of \"<t>.<body>\">). Store it now: it cannot be read back or rotated."
    }
  }
}