Difference between revisions of "Twilio Unread Messages/Unread Missed Call Count"
Ashley DeBon (talk | contribs) (→Get Unread Call And Message Count) |
Ashley DeBon (talk | contribs) (→Successful Response (200)) |
||
| Line 33: | Line 33: | ||
==== Request Body ==== | ==== Request Body ==== | ||
None. | None. | ||
| + | |||
| + | === cURL Example for Android === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/unread-call-message-count' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
| + | |||
| + | === cURL Example for iOS === | ||
| + | |||
| + | <pre> curl --location 'https://apimobile.callproof.com/api/unread-call-message-count' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre> | ||
=== Successful Response (200) === | === Successful Response (200) === | ||
Latest revision as of 07:29, 21 July 2026
Mobile_API »Get Unread Call And Message Count
Base URL
https://apimobile.callproof.com
Endpoint
/api/unread-call-message-count
Purpose
Returns unread inbound SMS count for the authenticated user’s company and unread/missed call count for the authenticated user.
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/unread-call-message-count' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/unread-call-message-count' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Returns unread message and missed-call counts.
| Field | Type | Description |
|---|---|---|
| clientStatusCode | integer | Status indicator for the client (for example, 200) |
| user_id | integer | Identifier of the authenticated user |
| company_id | integer | Identifier of the authenticated user’s company |
| data | object | Count payload |
| uri | string | Requested resource URI |
data
| Field | Type | Description |
|---|---|---|
| twilio_sms_count | integer | Number of unread inbound SMS messages for the company (messages not marked as seen) |
| twilio_call_count | integer | Sum of unread/missed call counts for the authenticated user (calls not yet viewed) |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – counts could not be retrieved |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – An error occurred while retrieving unread message/call counts.
- 401 – Authentication failed or the access token is missing/expired.