{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zvid-io/json-schema/zvid-io-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zvid-io-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "enum": [
          "render.completed",
          "render.failed"
        ]
      }
    },
    "status": {
      "enum": [
        "active",
        "disabled"
      ]
    },
    "secret": {
      "type": "string",
      "description": "Returned by creation and single-webhook lookup; omitted from list/update responses."
    },
    "consecutiveFailures": {
      "type": "integer"
    },
    "lastSuccessAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFailureAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFailureReason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "url",
    "events",
    "status"
  ],
  "additionalProperties": true
}