{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nowgetitdone-com/json-schema/nowgetitdone-com-webhook-endpoint-schema.json",
  "title": "WebhookEndpoint",
  "description": "A webhook endpoint configuration — NEVER includes the signing secret (shown once, at creation/rotation).",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nowgetitdone-com-openapi.yml#/components/schemas/WebhookEndpoint",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Stable id of the endpoint."
    },
    "url": {
      "type": "string",
      "description": "The https destination URL."
    },
    "enabled": {
      "type": "boolean",
      "description": "False when disabled — manually, auto-disabled after repeated delivery failures, or paused when the account that set it up had its email address verified (see `disabled_reason`). A disabled endpoint receives nothing: deliveries already queued for it are held, not sent, and go out only if it is re-enabled."
    },
    "event_types": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookEndpointEventType"
      },
      "description": "Subscribed event types. An EMPTY array means \"every type\"."
    },
    "verified": {
      "type": "boolean",
      "description": "True once the `verify` action has proven this endpoint accepts a correctly-signed request."
    },
    "disabled_reason": {
      "description": "Why the endpoint was auto-disabled or paused by an account take-back, or null when it never was.",
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "description": "ISO-8601 UTC."
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      "description": "ISO-8601 UTC."
    }
  },
  "required": [
    "id",
    "url",
    "enabled",
    "event_types",
    "verified",
    "disabled_reason",
    "created_at",
    "updated_at"
  ],
  "additionalProperties": false,
  "$defs": {
    "WebhookEndpointEventType": {
      "type": "string",
      "enum": [
        "task.created",
        "task.updated",
        "task.archived"
      ],
      "description": "One of the frozen domain event types an endpoint can subscribe to."
    }
  }
}