{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/donebear-com/json-schema/donebear-com-webhook-delivery-schema.json",
  "title": "WebhookDelivery",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/donebear-com-api-openapi.json#/components/schemas/WebhookDelivery",
  "additionalProperties": false,
  "properties": {
    "attemptCount": {
      "type": "integer"
    },
    "completedAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "endpointId": {
      "format": "uuid",
      "type": "string"
    },
    "eventId": {
      "format": "uuid",
      "type": "string"
    },
    "eventType": {
      "type": "string"
    },
    "id": {
      "format": "uuid",
      "type": "string"
    },
    "lastAttemptAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "lastError": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastResponseSnippet": {
      "type": [
        "string",
        "null"
      ]
    },
    "lastStatusCode": {
      "type": [
        "integer",
        "null"
      ]
    },
    "nextAttemptAt": {
      "format": "date-time",
      "type": [
        "string",
        "null"
      ]
    },
    "payload": {
      "$ref": "#/$defs/WebhookEvent"
    },
    "status": {
      "enum": [
        "pending",
        "succeeded",
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "attemptCount",
    "createdAt",
    "endpointId",
    "eventId",
    "eventType",
    "id",
    "payload",
    "status"
  ],
  "type": "object",
  "$defs": {
    "WebhookEvent": {
      "additionalProperties": false,
      "description": "The body of every delivery. `data.object` is the full record after the change (before it, for a delete); `data.changes` names the fields that differ from the previous state on an update.",
      "properties": {
        "apiVersion": {
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "data": {
          "additionalProperties": false,
          "properties": {
            "changes": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "object": {
              "additionalProperties": true,
              "type": "object"
            }
          },
          "required": [
            "changes",
            "object"
          ],
          "type": "object"
        },
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "syncActionId": {
          "type": [
            "string",
            "null"
          ]
        },
        "type": {
          "type": "string"
        },
        "workspaceId": {
          "format": "uuid",
          "type": "string"
        }
      },
      "required": [
        "apiVersion",
        "createdAt",
        "data",
        "id",
        "type",
        "workspaceId"
      ],
      "type": "object"
    }
  }
}