{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateIntegrationRequest",
  "title": "CreateIntegrationRequest",
  "type": "object",
  "required": [
    "name",
    "type"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the integration."
    },
    "type": {
      "type": "string",
      "description": "Type of the integration (e.g. API, Marid, Email, etc.)."
    },
    "ownerTeam": {
      "type": "object",
      "description": "Team that owns the integration.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Team ID."
        },
        "name": {
          "type": "string",
          "description": "Team name."
        }
      }
    },
    "allowWriteAccess": {
      "type": "boolean",
      "description": "Whether the integration allows write access."
    },
    "allowConfigurationAccess": {
      "type": "boolean",
      "description": "Whether the integration allows configuration access."
    },
    "ignoreRespondersFromPayload": {
      "type": "boolean",
      "description": "Whether to ignore responders from the incoming payload."
    },
    "suppressNotifications": {
      "type": "boolean",
      "description": "Whether to suppress notifications from this integration."
    },
    "responders": {
      "type": "array",
      "description": "Default responders for the integration.",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Responder ID."
          },
          "name": {
            "type": "string",
            "description": "Responder name."
          },
          "type": {
            "type": "string",
            "enum": [
              "team",
              "user",
              "escalation",
              "schedule"
            ],
            "description": "Responder type."
          }
        }
      }
    }
  }
}