Returns a user’s total talk time and number of calls.
GEThttps://secure-api.setshape.com/api/get/user/talktime/{crmid}
Replace
{crmid} with your CRM ID, the Shape system ID that belongs to your API key. Send the standard headers on every request: Authorization: YOUR_API_AUTHORIZATION_KEY and Content-Type: application/json. See Authentication.This report returns data for the system your API key belongs to. Use the CRM ID and API key for the same system.
Unlike the other reports, this is a GET request with query parameters. Dates are optional; leave them out for all time. See Reports Overview.
Query parameters
| Field | Requirement | Description |
|---|---|---|
user_id |
Required | The user ID, from Get Users. |
start_date |
Optional | Start of the date range. |
end_date |
Optional | End of the date range. |
Example request
curl --request GET
--url "https://secure-api.setshape.com/api/get/user/talktime/YOUR_CRM_ID?user_id=1024"
--header "Authorization: YOUR_API_AUTHORIZATION_KEY"
--header "Accept: application/json"
Example response
{
"message": "User Total talk time fetched successfully",
"total_talk_time": "24:05 minutes:seconds",
"number_of_calls": 52
}