Docs
Get call history
https://api.apifonica.com/v2/accounts/{accountSID}/calls
Overview
To get the call history for the account, make the GET request to /accounts/{accountSID}/calls.
The results can be narrowed by specifying filtering parameters.
REQUEST EXAMPLES
The following example demonstrates getting call logs.
curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/calls \
-u {accountSID}:{authToken}
RESPONSE EXAMPLE
{
"limit": 20,
"prev": null,
"next": "https://api.apifonica.com/v2/accounts/{accountSID}/calls?next=4771",
"calls": [
{
"call_sid": "{callSID}",
"parent_call_sid": "{callSID}",
"created": "Fri, 21 Apr 2017 13:01:25 +0000",
"account_sid": "{accountSID}",
"from": "358942417543",
"to": "442038075273",
"direction": "outbound",
"status": "completed",
"controller": "https://www.apifonica.com/maketestcall.xml",
"method": "GET",
"timeout": 15,
"updated": "Fri, 21 Apr 2017 13:02:02 +0000",
"started": "Fri, 21 Apr 2017 13:01:37 +0000",
"ended": "Fri, 21 Apr 2017 13:01:43 +0000",
"duration": 18,
"price": 0.0294
"record_sid": "rec23ed4a82-b7ee-31ff-b8dc-c89ea90d6d82",
"tag": "MyClient_1"
"channel": "number"
},
… ]
}
Parameter | Description |
---|
RESPONSE FILTERING
To narrow the response results, specify filtering parameters in the GET request.
REQUEST EXAMPLE (WITH FILTERING)
The following curl request demonstrates getting a list of completed outbound calls.
curl –X GET https://api.apifonica.com/v2/accounts/{accountSID}/calls?direction=outbound&status=completed \
-u {accountSID}:{authToken}
FILTERING PARAMETERS
Parameter | Description |
---|
CALL STATUS
Call events online statuses.
Please note, that not of all these statuses can be catched by GET request
Parameter | Description |
---|