{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/schedulin-app/json-schema/schedulin-app-webhook-endpoint-schema.json",
  "title": "WebhookEndpoint",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/schedulin-app-openapi.json#/components/schemas/WebhookEndpoint",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "secret": {
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "enum": [
          "post.published",
          "post.failed",
          "generation.completed",
          "generation.failed",
          "social_account.connected"
        ],
        "type": "string"
      }
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "enabled": {
      "type": "boolean"
    },
    "consecutiveFailures": {
      "type": "integer"
    },
    "lastSuccessAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastFailureAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "disabledAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "x-native-type": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "x-native-type": "date"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "x-native-type": "date"
    }
  },
  "required": [
    "id",
    "url",
    "secret",
    "events",
    "description",
    "enabled",
    "consecutiveFailures",
    "lastSuccessAt",
    "lastFailureAt",
    "disabledAt",
    "createdAt",
    "updatedAt"
  ]
}