Difference between revisions of "Schedule Notification"
Ashley DeBon (talk | contribs) (Created page with "== Schedule Push Notification == === Base URL === https://apimobile.callproof.com === Endpoint === /api/ai/chat-bot/schedule-notification === Purpose === Schedules a push n...") |
Ashley DeBon (talk | contribs) (→Schedule Push Notification) |
||
| Line 1: | Line 1: | ||
| − | == Schedule Push Notification == | + | ==[[Mobile_API]] » Schedule Push Notification == |
=== Base URL === | === Base URL === | ||
Latest revision as of 15:36, 21 July 2026
Contents
Mobile_API » Schedule Push Notification
Base URL
https://apimobile.callproof.com
Endpoint
/api/ai/chat-bot/schedule-notification
Purpose
Schedules a push notification reminder for the authenticated user’s device (for example, reminding them to start their next appointment). The notification is sent to the provided FCM token for the specified device type at the given date/time.
HTTP Method
POST
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer access token |
Security
- Yes – Requires Bearer Token authentication.
Parameters
Path Parameters
None.
Query Parameters
None.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| fcm_token | string | Yes | Firebase Cloud Messaging token for the target device |
| device_type | string | Yes | Device platform type (for example, Android or iOS) |
| body | string | Yes | Notification message text (maximum 255 characters) |
| time | string | Yes | Scheduled date/time in Y-m-d H:i:s format (for example, 2026-07-21 15:30:00)
|
Successful Response (200)
Indicates that the push notification was scheduled successfully.
| 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 | string | Confirmation message (for example, "Push notification scheduled successfully.") |
| uri | string | Requested resource URI |
Error Responses
| Status Code | Meaning |
|---|---|
| 200 | Validation failed – response body uses clientStatusCode 422 with the first validation error message
|
| 400 | Bad Request – the notification could not be scheduled |
| 401 | Unauthorized – missing, invalid, or expired Bearer token |
- Validation (HTTP 200, clientStatusCode 422) – Missing/invalid
fcm_token,device_type,body, ortime(including wrong date format or body longer than 255 characters). - 400 – Invalid input parameters, or another scheduling error.
- 401 – Authentication failed or the access token is missing/expired.