Calls
Create a Call
Create a call.
Permissions
The API token must include the following scopes: Voice.
post/Accounts/{AccountSid}/Calls
Path parameters
AccountSidstring uuid required
The Project ID that uniquely identifies the Account.
Request body
Example request
{
"Url": "http://your-application.com/docs/voice.xml",
"ApplicationSid": "b3877c40-da60-4998-90ad-b792e98472ap",
"From": "+13103384645",
"To": "+13105678901",
"CallerId": "+13102259067",
"FallbackMethod": "GET",
"FallbackUrl": "https://your-api-endpoint.com/path",
"MachineDetection": "Enable",
"AsyncAmdStatusCallback": "https://your-api-endpoint.com/path",
"AsyncAmdStatusCallbackMethod": "GET",
"MachineDetectionSilenceTimeout": 5000,
"MachineDetectionSpeechThreshold": 2400,
"MachineDetectionSpeechEndThreshold": 1200,
"MachineDetectionTimeout": 30,
"MachineWordsThreshold": 6,
"MaxPricePerMinute": 0.0075,
"Method": "POST",
"RecordingChannels": "mono",
"RecordingStatusCallback": "https://your-api-endpoint.com/path",
"RecordingStatusCallbackMethod": "POST",
"RecordingTrack": "both",
"SipAuthUsername": "sipuser",
"SipAuthPassword": "sippassword",
"SendDigits": "w",
"StatusCallback": "https://your-api-endpoint.com/path",
"StatusCallbackEvent": [
"completed"
],
"StatusCallbackMethod": "GET",
"Timeout": "60",
"Trim": "trim-silence"
}Response
The request has succeeded.
Example response
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472af",
"annotation": "Call annotation text",
"api_version": "2010-04-01",
"date_created": "Wed, 19 Sept 2018 20:00:00 +0000",
"date_updated": "Wed, 19 Sept 2018 21:00:00 +0000",
"duration": 20,
"end_time": "Fri, 21 Sept 2018 10:00:00 +0000",
"forwarded_from": "+13102259067",
"from": "+13103384645",
"formatted_from": "+13102259067",
"parent_call_sid": "b3877c40-da60-4998-90ad-b792e98472af",
"phone_number_sid": "b3877c40-da60-4998-90ad-b792e98472pn",
"price": 0.003,
"price_unit": "USD",
"sid": "b3877c40-da60-4998-90ad-b792e98472ca",
"start_time": "Wed, 19 Sept 2018 20:00:01 +0000",
"subresource_uris": {
"notifications": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Notifications.json",
"recordings": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca/Recordings.json"
},
"to": "+13105678901",
"formatted_to": "(310) 567-8901",
"uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/b3877c40-da60-4998-90ad-b792e98472ca.json"
}