Newer Version Available

This content describes an older version of this product. View Latest

Create VoiceCall

Creates a VoiceCall record containing the participants (that is, the caller and recipient) for the VoiceCall. When you create a VoiceCall record, it creates a conversation in Salesforce. Only use this API in the real-time context, which means that you should invoke this API when the call is initiated.

This API also can be used to create VoiceCalls records for transfer and conference calls by including the parentVoiceCallId parameter in the request payload.

This endpoint is available in API version 49.0 and later.

URI
/telephony/v1/voiceCalls
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: Bearer token
Parameters
Property Name Type Description Required
callCenterApiName string API name of your call center created in Salesforce. Yes
parentVoiceCallId string If included, creates a VoiceCall that is parented to the value in this field. Do not include this property when creating an initial VoiceCall. No
vendorCallKey string Unique key that identifies the VoiceCall within the telephony system. For example, if the telephony system is Amazon Connect, this value is the contact ID. Yes
to string The phone number to which the call was made. For example, for an inbound call, this value is the contact center phone number. Yes
from string The phone number from which the call was made. For example, for an inbound call, this value is the End User's phone number. Yes
initiationMethod string Initiation method of the call. Allowed values: Inbound / Outbound / Transfer / Conference Yes
startTime string Start Time of the call. Yes
participants array Participants in the call. You can add 1 or more participants with at least 1 minimum participant. Participants are passed in as an array and each participant object in the array must confirm to the following pattern. Both the fields are required.
type can be either END_USER or HUMAN_AGENT
participantKey is the End User phone number or the agent's Salesforce username.
Yes
callAttributes string Set VoiceCall custom fields using key: value pairs in a JSON string. The key is the API name of the custom field and value is the value to set in that field. Ignored when creating VoiceCall for transfer. No
Example
Request:
Response without any errors:
Response with errors: