Updated on: October 9, 2025
Purpose: Retrieve a paginated list of recent calls initiated via Salpre.
Endpoint
GET https://ai.salpre.com/api/gateway/v1/call/list
Authentication: send your Account Secret Key in the header.
account-secret-key: YOUR_API_KEY
Keep your key private. Make requests from your server when possible.
Query parameters
Name | Type | Required | Description |
---|---|---|---|
per_page | integer | No | Number of records to return per page. Example: 10 . |
Code samples
cURL (Bash)
curl --location --request GET 'https://ai.salpre.com/api/gateway/v1/call/list?per_page=10' \
--header 'account-secret-key: YOUR_API_KEY'
JavaScript (Fetch)
const myHeaders = new Headers();
myHeaders.append("account-secret-key", "YOUR_API_KEY");
const requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow"
};
fetch("https://ai.salpre.com/api/gateway/v1/call/list?per_page=10", requestOptions)
.then(res => res.json())
.then(result => console.log(result))
.catch(error => console.log("error", error));
Example response
The exact schema may evolve; treat this as a representative example.
{
"status": "success",
"data": [
{
"call_id": "c123456",
"status": "completed",
"from": "salprebox:EXAMPLE_SERIAL_NO",
"to": "+905xxxxxxxxx",
"agent_id": 5,
"direction": "outbound",
"started_at": "2025-10-09T10:41:22Z",
"ended_at": "2025-10-09T10:44:04Z",
"duration_sec": 162
},
{
"call_id": "c123457",
"status": "failed",
"from": "salprebox:EXAMPLE_SERIAL_NO",
"to": "+905xxxxxxxxx",
"agent_id": 5,
"direction": "outbound",
"started_at": "2025-10-09T09:13:01Z",
"ended_at": "2025-10-09T09:13:11Z",
"duration_sec": 10
}
],
"meta": {
"per_page": 10,
"page": 1,
"has_next": true
}
}
Error responses
Missing or invalid authentication key
{
"status": "error",
"message": "Unauthorized. Missing or invalid account-secret-key"
}
Invalid parameter
{
"status": "error",
"message": "Invalid per_page value"
}
Notes & tips
- Use
per_page
to limit payload size when building dashboards. - Store
call_id
values if you plan to fetch details or logs later. - Filter and search can be added client-side (by
status
,agent_id
, date range) after you fetch the list. If you later expose server-side filters, they can be appended as query params without breaking existing clients.