{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/postbase-so/json-schema/postbase-so-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/postbase-so-openapi.json#/components/schemas/Webhook",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "post.published",
          "post.partial",
          "post.failed",
          "channel.needs_reconnect"
        ]
      }
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "secret_hint": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "last_delivery": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "delivered",
            "failed"
          ]
        },
        "response_status": {
          "type": [
            "integer",
            "null"
          ]
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  },
  "required": [
    "id",
    "url",
    "events"
  ]
}