Push notification in Twilio
Contents
Send Push Notification
Base URL
https://apimobile.callproof.com
Endpoint
/api/send-push-notification/{call_sid}
Purpose
Looks up an inbound Twilio call by its Call SID (resolving the parent call when needed), returns who answered the call, and sends a push notification to other call-center users associated with that Twilio phone number (excluding the authenticated user).
HTTP Method
GET
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| call_sid | string | Yes | Twilio Call SID used to identify the call and resolve its parent call |
Query Parameters
None.
Request Body
None.
cURL Example for Android
curl --location 'https://apimobile.callproof.com/api/send-push-notification/{call_sid}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
cURL Example for iOS
curl --location 'https://apimobile.callproof.com/api/send-push-notification/{call_sid}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
Successful Response (200)
Returns answered-call notification details. Push notifications may also be delivered to other call-center devices for the same Twilio number.
| 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 | array | Notification details (see below) |
| uri | string | Requested resource URI |
data[]
| Field | Type | Description |
|---|---|---|
| user_id | integer | Identifier of the user who answered the call |
| rep_name | string | Full name of the user who answered the call |
| message | string | Notification message (for example, "Call Answered by John Doe") |
Error Responses
| Status Code | Meaning |
|---|---|
| 400 | Bad Request – push notification could not be prepared/sent |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- 400 – No matching call/notification records found ("No Records Found"), or another processing error.
- 401 – Authentication failed or the access token is missing/expired.