{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sentinelx-app/json-schema/sentinelx-app-create-integration-request-schema.json",
  "title": "CreateIntegrationRequest",
  "description": "Body for POST /dashboard/api/integrations.\n\n`secret_value` is the only place plaintext credentials enter the\nsystem. It is consumed immediately by storage.set_integration,\nencrypted with Fernet, and never persisted in plaintext nor\nreturned in any response.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sentinelx-app-openapi.json#/components/schemas/CreateIntegrationRequest",
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1,
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_\\-]{0,63}$",
      "title": "Name",
      "description": "Short user-chosen label, e.g. 'personal-cf'. Letters, digits, underscore and hyphen only; must start with an alphanumeric."
    },
    "provider": {
      "type": "string",
      "enum": [
        "cloudflare",
        "telegram",
        "resend",
        "compute"
      ],
      "title": "Provider",
      "description": "Which third-party service this credential is for."
    },
    "secret_value": {
      "type": "string",
      "maxLength": 8192,
      "minLength": 1,
      "title": "Secret Value",
      "description": "The plaintext credential (API token, bot token, etc.). Sent encrypted-at-rest immediately; never logged."
    },
    "metadata": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Metadata",
      "description": "Non-secret hints to the playbook layer, e.g. {'zone': 'pensa.ar'} for Cloudflare. Must not contain secret data — anything in here is returned by list."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "name",
    "provider",
    "secret_value"
  ]
}