List Calls
Returns the list of Calls, optionally filtered by parameters. This method supports pagination.
Basic Authorization header using the BASIC scheme. Use a pair companySid:token to access the API.
In: header
Query Parameters
Call direction.
Value in
- "Inbound"
- "Outbound"
The Phone Number which belongs to your Telgorithm account and which was the originating (caller) or
terminating (callee) party of the Call, depending on the Direction.
length <= 16The external Phone Number or SIP URI which was the originating (caller) or terminating (callee) party
of the Call, depending on the Direction.
If it is a SIP URI, it must start with the sip: or sips: prefix, and must be formatted
according to RFC 3261 standard. Examples of valid SIP URI:
sip:user@server.com:5060sip:user@server.com;transport=TLSsip:user@server.com?header1=value1&header2=value2sip:user@server.com:5060;transport=TCP?header=value
length <= 256Date and time, that Call creation date should be greater than or equal to.
Must have ISO format (e.g. yyyy-MM-dd'T'HH:mm:ss).
date-timeDate and time, that Call creation date should be less than.
Must have ISO format (e.g. yyyy-MM-dd'T'HH:mm:ss).
date-timeint321 <= value <= 10000Possible values:
-
Ascending
-
Descending
Value in
- "Ascending"
- "Descending"
Response Body
curl -X GET "https://example.com/v1/Calls"{ "items": [ { "sid": "string", "internalNumber": "+12145678900", "externalNumber": "+19876543210", "direction": "Inbound", "createdOn": "2023-09-09T15:00:00.000Z", "status": "Created", "startedOn": "2023-09-09T15:00:00.000Z", "completedOn": "2023-09-09T15:00:00.000Z" } ], "searchId": "string"}{ "errors": { "Name": [ "The Name field is required." ] }, "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "detail": "Some detailed message", "traceId": "|4ef17786-b103-420e-89c0-cc425ac14809.edfcbee9_"}Get Call Leg Info GET
Returns the specified Call Leg information. If includeFees is `true`, fees are included into result.
Initiate Outbound Call POST
This endpoint allows to initiate two-leg Outbound Calls. The first call leg is initiated from the internal Phone Number (which belongs to your account, specified by `CallerId` field in the request body) to the agent's Phone Number (an external number, specified by `From` field). When the first leg is answered, Telgorithm randomly selects one digit from 1 to 9 and plays a voice instruction telling the agent which digit to press. The agent must press that exact digit. For example, if the instruction says to press 7, only 7 is accepted; pressing any other digit will not complete the human-verification step. Finally, the second leg is initiated from the internal Phone Number (`CallerId`) to the `To` number specified in the request body, and when it is answered, both call legs are connected to each other. The Call ends when any party hang it up, or when you request hangup by an API call.