{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/signicat/main/json-schema/signicat-subscription-create-schema.json",
  "title": "SubscriptionCreate",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signicat-events-openapi.yml#/components/schemas/SubscriptionCreate",
  "required": [
    "name",
    "type",
    "typeConfiguration"
  ],
  "type": "object",
  "properties": {
    "name": {
      "maxLength": 64,
      "minLength": 3,
      "type": "string"
    },
    "type": {
      "maxLength": 64,
      "minLength": 3,
      "enum": [
        "GooglePubSub",
        "Mint",
        "Webhook",
        "AzureServiceBus"
      ],
      "type": "string"
    },
    "typeConfiguration": {},
    "eventNameFilter": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "tagFilter": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "messageAuthentication": {
      "allOf": [
        {
          "$ref": "#/$defs/MessageAuthenticationOptions"
        }
      ],
      "nullable": true
    },
    "expiresAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "HmacSha256AuthenticationOptions": {
      "type": "object",
      "properties": {
        "secret": {
          "maxLength": 64,
          "minLength": 16,
          "pattern": "^\\S+$",
          "type": [
            "string",
            "null"
          ],
          "description": "Secret used for HmacSha256 authentication."
        }
      },
      "additionalProperties": false
    },
    "MessageAuthenticationOptions": {
      "type": "object",
      "properties": {
        "authenticationType": {
          "allOf": [
            {
              "$ref": "#/$defs/MessageAuthenticationType"
            }
          ],
          "description": "Which authentication method to use for events. Defaults to None."
        },
        "hmacSha256": {
          "allOf": [
            {
              "$ref": "#/$defs/HmacSha256AuthenticationOptions"
            }
          ],
          "description": "Options for HmacSha256 authentication. Required when `AuthenticationType` equals `HmacSha256`.",
          "nullable": true
        }
      },
      "additionalProperties": false
    },
    "MessageAuthenticationType": {
      "enum": [
        "None",
        "HmacSha256"
      ],
      "type": "string"
    }
  }
}