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 a real-time context, which means that you should invoke this API only when a 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 Passes the Salesforce VoiceCall record ID or the parent call’s vendor key, which is a unique ID. If included, creates a VoiceCall that is parented to the value in this field. Don’t 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 / Transfer.

(Outbound not currently supported.)

Yes
startTime string Start Time of the call. Yes
participants array Participants in the call. You can add one or more participants with at least one minimum participant. Participants are passed in as an array and each participant object in the array must contain the participantKey property with the participant’s phone number and a type property with "END_USER".
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: