{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sudomock-com/json-schema/sudomock-com-webhook-endpoint-create-request-schema.json",
  "title": "WebhookEndpointCreateRequest",
  "description": "Create a webhook endpoint.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sudomock-com-webhook-endpoints-api-openapi.yml#/components/schemas/WebhookEndpointCreateRequest",
  "properties": {
    "url": {
      "type": "string",
      "maxLength": 2048,
      "minLength": 1,
      "description": "https endpoint URL"
    },
    "description": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional label that helps you recognize this endpoint."
    },
    "event_types": {
      "items": {
        "type": "string",
        "enum": [
          "render.succeeded",
          "render.failed",
          "upload.succeeded",
          "video.succeeded",
          "video.failed",
          "2d_mockup.ready",
          "2d_mockup.rejected",
          "2d_mockup.failed",
          "2d_render.succeeded",
          "2d_render.failed",
          "photo_mockup.ready",
          "photo_mockup.rejected",
          "photo_mockup.failed",
          "photo_mockup_render.succeeded",
          "photo_mockup_render.failed",
          "webhook.test"
        ]
      },
      "type": "array",
      "description": "Subscribed event types; empty = all events (wildcard)."
    },
    "event_naming": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "legacy",
            "current"
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Which spelling of the photo-mockup events this endpoint receives: 'current' (photo_mockup.*, photo_mockup_render.*) or 'legacy' (2d_mockup.*, 2d_render.*). The payload's kind follows. Omit it and the endpoint is pinned to the spelling event_types is written in: the family names for a list that subscribes to them, otherwise 'legacy', the spelling this contract publishes."
    }
  },
  "type": "object",
  "required": [
    "url"
  ]
}