{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnautical-com/json-schema/arcnautical-com-webhook-delivery-schema.json",
  "title": "WebhookDelivery",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnautical-com-webhooks-api-openapi.yml#/components/schemas/WebhookDelivery",
  "type": "object",
  "required": [
    "id",
    "event_id",
    "event_type",
    "status",
    "attempt",
    "created_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "event_id": {
      "type": "string",
      "description": "Stable across a replay, so both attempts correlate."
    },
    "event_type": {
      "type": "string"
    },
    "endpoint_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "Null if the endpoint has since been deleted."
    },
    "endpoint_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "retry",
        "sending",
        "delivered",
        "dead"
      ]
    },
    "status_code": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Last HTTP status your endpoint returned."
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "attempt": {
      "type": "integer"
    },
    "next_retry_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Null once terminal."
    },
    "delivered_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "replay_of": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The delivery this one was queued to replace."
    },
    "payload": {
      "type": "object",
      "additionalProperties": true,
      "description": "Present on the single-delivery read: the body exactly as signed and sent."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}