{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentseo-dev/json-schema/agentseo-dev-webhook-delivery-schema.json",
  "title": "WebhookDelivery",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agentseo-dev-webhooks-api-openapi.yml#/components/schemas/WebhookDelivery",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "user_id": {
      "type": "string",
      "format": "uuid"
    },
    "endpoint_id": {
      "type": "string",
      "format": "uuid"
    },
    "job_id": {
      "type": "string",
      "format": "uuid"
    },
    "event_type": {
      "type": "string",
      "enum": [
        "job.completed",
        "job.failed",
        "project.budget_warning",
        "project.budget_exceeded"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "delivered",
        "failed"
      ]
    },
    "target_url": {
      "type": "string",
      "format": "uri"
    },
    "request_body": {
      "type": "object"
    },
    "attempt_count": {
      "type": "integer"
    },
    "response_status": {
      "type": [
        "integer",
        "null"
      ]
    },
    "response_body": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_error": {
      "type": [
        "string",
        "null"
      ]
    },
    "delivered_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "last_attempt_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "next_attempt_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "endpoint": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "is_active": {
          "type": "boolean"
        }
      }
    }
  }
}