Get call history
This section provides instructions for using the /call/get-call-history endpoint to retrieve the status and details of a list calls made through our API.
Step 1: Prepare your request
Endpoint:
/call/get-call-history
Method:
POST
URL:
https://api.talkstackai.com/call/get-call-history
Headers: Include
Content-Type: application/json
.Authorization: Bearer token or x-api-key in headers
Step 2: Create the Request Body
projectId
: id of the project for which you want to fetch the call list.pageSize
(optional): number of logs to be displayed in the call list. If pages is not defined default value, i.e., 20 is used. It is optional and defaults to 20.
Step 3: Filter using query params
to
: filter the list to include the call made to a specific number.from
: filter the list to include the call made from a specific number.status
: filter the list to include the call with a specific status. The status value will be one of the following:queued
,initiated
,ringing
,in-progress
,completed
,busy
,failed
, orno-answer
.startTime
: Only include calls that started on this date. Specify a date asYYYY-MM-DD
in UTC, for example:2009-07-06
, to read only calls that started on this date.startTimeBefore
: Only include calls that started on or before midnight of this date. Specify a date asYYYY-MM-DD
in UTC, for example2009-07-06
.startTimeAfter
: Only include calls that started on or after midnight of this date. Specify a date asYYYY-MM-DD
in UTC, for example2009-07-06
..endTime
: Only include calls that ended on this date. Specify a date asYYYY-MM-DD
in UTC, for example2009-07-06
.endTimeBefore
: Only include calls that ended on or before midnight of this date. Specify a date asYYYY-MM-DD
in UTC, for example2009-0-06
..endTimeAfter
: Only include calls that ended on or after midnight of this date. Specify a date asYYYY-MM-DD
in UTC, for example2009-0-06
.
Step 4: Handle the response
The response will provide the list of calls associated with projectId and filtered using the query parameters.
Success Response:
Status Code:
200 OK
Body: The response includes details like status, from, to, date, recordingUrls, and additional call data
Troubleshooting
400 Bad Request
: If theprojectId
is missing in the request.404 Not Found
: If the call list for the providedprojectId
is empty.500 Internal Server Error
: For errors in fetching the call list.
Last updated