{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/railhook-io/json-schema/railhook-io-incoming-source-request-schema.json",
  "title": "IncomingSourceRequest",
  "description": "Request to create or update an incoming webhook source",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/railhook-io-openapi.yml#/components/schemas/IncomingSourceRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name for the source",
      "maxLength": 255,
      "minLength": 0
    },
    "slug": {
      "type": "string",
      "description": "URL-friendly slug (auto-generated if omitted)",
      "maxLength": 64,
      "minLength": 0,
      "pattern": "^[a-z0-9][a-z0-9-]*$"
    },
    "providerType": {
      "type": "string",
      "description": "GENERIC, or the id of a provider listed by GET /api/v1/incoming-providers"
    },
    "status": {
      "type": "string",
      "description": "Source status",
      "enum": [
        "ACTIVE",
        "DISABLED"
      ]
    },
    "verificationMode": {
      "type": "string",
      "description": "Signature verification mode",
      "enum": [
        "NONE",
        "HMAC_GENERIC",
        "PROVIDER"
      ]
    },
    "hmacSecret": {
      "type": "string",
      "description": "HMAC secret for signature verification (write-only, never returned)"
    },
    "hmacHeaderName": {
      "type": "string",
      "description": "HTTP header name containing the signature",
      "maxLength": 255,
      "minLength": 0
    },
    "hmacSignaturePrefix": {
      "type": "string",
      "description": "Prefix before the signature value",
      "maxLength": 50,
      "minLength": 0
    },
    "rateLimitPerSecond": {
      "type": "integer",
      "format": "int32",
      "description": "Rate limit per second for the ingress URL, at most the plan's own (null = the default limit)",
      "maximum": 10000,
      "minimum": 1
    }
  },
  "required": [
    "name"
  ]
}