{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beatapi/json-schema/beatapi-webhook-endpoint-response-schema.json",
  "title": "WebhookEndpointResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beatapi-webhooks-api-openapi.yml#/components/schemas/WebhookEndpointResponse",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "$ref": "#/$defs/WebhookEndpoint",
      "description": "Created or retrieved webhook endpoint. Public API responses return the full signing secret at creation and mask it afterward; authenticated dashboard owners can explicitly reveal it again."
    }
  },
  "$defs": {
    "WebhookEndpoint": {
      "type": "object",
      "required": [
        "id",
        "object",
        "url",
        "description",
        "events",
        "status",
        "secret",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable webhook endpoint ID used for get, update, and delete operations."
        },
        "object": {
          "type": "string",
          "enum": [
            "webhook_endpoint"
          ],
          "description": "Object discriminator; always `webhook_endpoint`."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "Public HTTPS callback URL receiving subscribed task events."
        },
        "description": {
          "type": "string",
          "description": "Account-defined label for the endpoint."
        },
        "events": {
          "type": "array",
          "description": "Task event types delivered to this endpoint.",
          "items": {
            "type": "string",
            "enum": [
              "task.succeeded",
              "task.failed"
            ]
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "disabled"
          ],
          "description": "Delivery status. Disabled endpoints do not receive events."
        },
        "secret": {
          "type": "string",
          "description": "Returned in full only when the endpoint is created. Later responses return a masked value."
        },
        "created_at": {
          "type": "integer",
          "description": "Unix timestamp when the endpoint was created."
        },
        "updated_at": {
          "type": "integer",
          "description": "Unix timestamp when the endpoint last changed."
        }
      }
    }
  }
}