Skip to main content

Create Call

This request creates a call.

post/calls

Sample

A sample POST request to create a call:

curl -X POST \
'https://api.carrierx.com/flexml/v1/calls' \
-H 'Content-Type: application/json' \
--data-binary '{"calling_did":"15162065319", "called_did":"15162065318"}' \
-u 'flexml_user_123:qwerty123'

Response

200 status code with a serialized copy of the Call object:

{
"account_sid": "1d4adc32-45d1-4789-9780-928049e2bce1",
"attributes": {},
"call_sid": "2f367eb5-adc6-4413-b603-533e2a8f0804",
"called_did": "15162065318",
"calling_did": "15162065319",
"date_created": "2018-10-16T20:59:18.094Z",
"delay": 0,
"method": "POST",
"status_callback_method": "POST",
"status_callback_url": null,
"url": null
}

Body Arguments

JSON representation of the fields and values of the Call object to be created.

Required fields to create a call are:

  • called_did
  • calling_did

The calling_did should be one of the DIDs assigned to the FlexML endpoint.

To schedule a call to happen in the future, set the delay parameter to the amount of seconds to wait before the call is executed.

For a complete list of Call object attributes, refer to this table.