{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autoposting-ai/json-schema/autoposting-ai-webhook-schema.json",
  "title": "Webhook",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autoposting-ai-webhooks-api-openapi.yml#/components/schemas/Webhook",
  "type": "object",
  "required": [
    "id",
    "url",
    "events",
    "enabled"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "enabled": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastDeliveryAt": {
      "type": "string",
      "format": "date-time"
    },
    "lastDeliveryStatus": {
      "type": "string"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "description": "Webhook event type. Use \"*\" to subscribe to all events.",
      "enum": [
        "post.published",
        "post.failed",
        "post.scheduled",
        "clip.render.completed",
        "clip.render.failed",
        "agent.run.completed",
        "agent.run.failed",
        "*"
      ]
    }
  }
}