{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/customdomain-ai/json-schema/customdomain-ai-webhook-endpoint-schema.json",
  "title": "WebhookEndpoint",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/customdomain-ai-webhooks-api-openapi.yml#/components/schemas/WebhookEndpoint",
  "type": "object",
  "required": [
    "id",
    "url"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "application_id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "secret": {
      "type": [
        "string",
        "null"
      ],
      "description": "Present ONLY in the creation response (whsec_…). Deliveries are signed with it: each POST carries X-JE-Timestamp (unix seconds) and X-JE-Signature (sha256=hex of HMAC-SHA256 over \"<timestamp>.<rawBody>\"). Reject deliveries whose timestamp is outside a ~5-minute window."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}