{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emailconnect/main/json-schema/emailconnect-create-webhook-alias-request-schema.json",
  "title": "CreateWebhookAliasRequest",
  "x-generated": "2026-10-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emailconnect-openapi.json#/components/schemas/CreateWebhookAliasRequest",
  "type": "object",
  "required": [
    "domainId",
    "webhookUrl",
    "webhookName",
    "aliasType"
  ],
  "properties": {
    "domainId": {
      "type": "string",
      "description": "ID of the domain to create the alias for"
    },
    "webhookUrl": {
      "type": "string",
      "format": "uri",
      "description": "URL for the webhook endpoint"
    },
    "webhookName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Name for the webhook"
    },
    "webhookDescription": {
      "type": "string",
      "maxLength": 500,
      "description": "Optional description for the webhook"
    },
    "aliasType": {
      "type": "string",
      "enum": [
        "catchall",
        "specific"
      ],
      "description": "Type of alias to create - catchall (*@domain.com) or specific (localpart@domain.com)"
    },
    "localPart": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Local part for specific aliases (required when aliasType is \"specific\")"
    },
    "syncWithDomain": {
      "type": "boolean",
      "default": true,
      "description": "For catch-all aliases, whether to sync webhook with domain webhook (default: true)"
    }
  }
}