{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-create-call-request-schema.json",
  "title": "CreateCallRequest",
  "description": "The request payload for creating the call.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-callautomation-api-openapi.yml#/components/schemas/CreateCallRequest",
  "required": [
    "callbackUri",
    "targets"
  ],
  "type": "object",
  "properties": {
    "targets": {
      "description": "The targets of the call.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CommunicationIdentifierModel"
      }
    },
    "sourceCallerIdNumber": {
      "$ref": "#/$defs/PhoneNumberIdentifierModel"
    },
    "sourceDisplayName": {
      "description": "Display name of the call if dialing out to a pstn number",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/CommunicationUserIdentifierModel"
    },
    "operationContext": {
      "description": "A customer set value used to track the answering of a call.",
      "type": "string"
    },
    "callbackUri": {
      "description": "The callback URI.",
      "type": "string"
    },
    "callIntelligenceOptions": {
      "$ref": "#/$defs/CallIntelligenceOptions"
    },
    "mediaStreamingOptions": {
      "$ref": "#/$defs/MediaStreamingOptions"
    },
    "transcriptionOptions": {
      "$ref": "#/$defs/TranscriptionOptions"
    },
    "teamsAppSource": {
      "$ref": "#/$defs/MicrosoftTeamsAppIdentifierModel"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "CallIntelligenceOptions": {
      "description": "AI options for the call.",
      "type": "object",
      "properties": {
        "cognitiveServicesEndpoint": {
          "description": "The identifier of the Cognitive Service resource assigned to this call.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "CommunicationIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/CommunicationIdentifierModel"
    },
    "CommunicationUserIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/CommunicationUserIdentifierModel"
    },
    "MediaStreamingAudioChannelType": {
      "description": "The audio channel type to stream, e.g., unmixed audio, mixed audio.",
      "enum": [
        "mixed",
        "unmixed"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "MediaStreamingAudioChannelType",
        "modelAsString": true
      }
    },
    "MediaStreamingOptions": {
      "description": "Options for media streaming.",
      "required": [
        "audioChannelType",
        "transportType"
      ],
      "type": "object",
      "properties": {
        "transportType": {
          "$ref": "#/$defs/StreamingTransportType"
        },
        "audioChannelType": {
          "$ref": "#/$defs/MediaStreamingAudioChannelType"
        }
      }
    },
    "MicrosoftTeamsAppIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/MicrosoftTeamsAppIdentifierModel"
    },
    "PhoneNumberIdentifierModel": {
      "$ref": "../../../Common/stable/2025-06-30/common.json#/components/schemas/PhoneNumberIdentifierModel"
    },
    "StreamingTransportType": {
      "description": "Defines the transport type used for streaming. Note that future values may be introduced that are not currently documented.",
      "enum": [
        "websocket"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "StreamingTransportType",
        "modelAsString": true
      }
    },
    "TranscriptionOptions": {
      "description": "Options for live transcription.",
      "required": [
        "locale",
        "transportType"
      ],
      "type": "object",
      "properties": {
        "transportType": {
          "$ref": "#/$defs/StreamingTransportType"
        },
        "locale": {
          "description": "Specifies the Locale used for transcription, e.g., en-CA or en-AU.",
          "type": "string"
        }
      }
    }
  }
}