{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/formfeed/json-schema/formfeed-webhook-endpoint-schema.json",
  "title": "WebhookEndpoint",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/formfeed-webhooks-api-openapi.yml#/components/schemas/WebhookEndpoint",
  "allOf": [
    {
      "$ref": "#/$defs/WebhookEndpointCreate"
    },
    {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "secret": {
          "type": "string",
          "description": "Only returned on creation."
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  ],
  "$defs": {
    "WebhookEndpointCreate": {
      "type": "object",
      "required": [
        "url",
        "events"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "events": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "render.completed",
              "render.failed",
              "job.completed",
              "job.failed",
              "quota.warning",
              "quota.exceeded",
              "storage.delivered",
              "storage.failed"
            ]
          }
        },
        "environments": {
          "type": "array",
          "description": "Render environments whose events the endpoint receives; both by default. Quota events are sent regardless.",
          "items": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "default": [
            "live",
            "test"
          ]
        },
        "description": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean",
          "default": true
        }
      }
    }
  }
}