Call Connection - Add Participant

Add a participant to the call.

POST {endpoint}/calling/callConnections/{callConnectionId}/participants:add?api-version=2024-09-15

URI Parameters

Name In Required Type Description
callConnectionId
path True

string

The call connection Id

endpoint
path True

string

url

The endpoint of the Azure Communication resource.

api-version
query True

string

Version of API to invoke.

Request Header

Name Required Type Description
Authorization True

string

An Azure Communication Services user access token.

Repeatability-Request-ID

string

uuid

If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-Id is an opaque string representing a client-generated unique identifier for the request. It is a version 4 (random) UUID.

Repeatability-First-Sent

string

date-time-rfc1123

If Repeatability-Request-ID header is specified, then Repeatability-First-Sent header must also be specified. The value should be the date and time at which the request was first created, expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.

Request Body

Name Required Type Description
participantToAdd True

CommunicationIdentifierModel

customCallingContext

CustomCallingContext

Used by customer to send custom calling context to targets

invitationTimeoutInSeconds

integer

Gets or sets the timeout to wait for the invited participant to pickup. The maximum value of this is 180 seconds

operationCallbackUri

string

Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.

operationContext

string

Used by customers when calling mid-call actions to correlate the request to the response event.

sourceCallerIdNumber

PhoneNumberIdentifierModel

sourceDisplayName

string

(Optional) The display name of the source that is associated with this invite operation when adding a PSTN participant or teams user. Note: Will not update the display name in the roster.

Responses

Name Type Description
202 Accepted

AddParticipantResponse

The service has accepted the add participant request and will begin processing it. You will receive either AddParticipantSucceeded or AddParticipantFailed event at your specified callback URI to update you on the status of the request.

Other Status Codes

CommunicationErrorResponse

Error

Security

Authorization

An Azure Communication Services user access token.

Type: apiKey
In: header

Examples

CallConnection_AddParticipant

Sample request

POST https://contoso.communications.azure.com/calling/callConnections/18dea47f-b081-4107-9a5c-4300819d2c6c/participants:add?api-version=2024-09-15

{
  "participantToAdd": {
    "kind": "communicationUser",
    "communicationUser": {
      "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
    }
  },
  "operationContext": "adding participant",
  "sourceCallerIdNumber": {
    "value": "+18440123456"
  },
  "operationCallbackUri": "https://app.contoso.com/callback"
}

Sample response

{
  "operationContext": "adding participant",
  "participant": {
    "identifier": {
      "kind": "communicationUser",
      "communicationUser": {
        "id": "8:acs:b9614373-fd0b-480c-8fd2-cb58b70eab9f_ae9e3307-f56e-44be-8934-80a63f080538"
      }
    },
    "isMuted": false
  },
  "invitationId": "7b4244f8-d2ff-46d1-a629-4f9fb5f73d40"
}

Definitions

Name Description
AddParticipantRequest

The request payload for adding participant to the call.

AddParticipantResponse

The response payload for adding participants to the call.

CallParticipant

A call participant.

CustomCallingContext

The custom calling context which will be sent to the target

AddParticipantRequest

The request payload for adding participant to the call.

Name Type Description
customCallingContext

CustomCallingContext

Used by customer to send custom calling context to targets

invitationTimeoutInSeconds

integer

Gets or sets the timeout to wait for the invited participant to pickup. The maximum value of this is 180 seconds

operationCallbackUri

string

Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.

operationContext

string

Used by customers when calling mid-call actions to correlate the request to the response event.

participantToAdd

CommunicationIdentifierModel

sourceCallerIdNumber

PhoneNumberIdentifierModel

sourceDisplayName

string

(Optional) The display name of the source that is associated with this invite operation when adding a PSTN participant or teams user. Note: Will not update the display name in the roster.

AddParticipantResponse

The response payload for adding participants to the call.

Name Type Description
invitationId

string

Invitation ID used to add a participant.

operationContext

string

The operation context provided by client.

participant

CallParticipant

List of current participants in the call.

CallParticipant

A call participant.

Name Type Description
identifier

CommunicationIdentifierModel

isMuted

boolean

Is participant muted

isOnHold

boolean

Is participant on hold.

CustomCallingContext

The custom calling context which will be sent to the target

Name Type Description
sipHeaders

object

Custom calling context SIP headers

voipHeaders

object

Custom calling context VoiP headers