Clinic Notifications API
Endpoints for managing notifications within the clinic system.
Appointment Reminders
Create Appointment Reminder
Send appointment reminder notifications to patients.
Endpoint: POST /v1/clinic/notifications/appointment_reminders
Authentication: Required
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
appointment_reminder | object | Yes | Reminder data object |
appointment_reminder.appointment_id | integer | Yes | ID of the appointment |
appointment_reminder.reminder_type | string | Yes | Type of reminder (sms, email, push) |
appointment_reminder.send_at | string | No | When to send reminder (ISO 8601) |
appointment_reminder.message | string | No | Custom reminder message |
appointment_reminder.language | string | No | Language for the reminder |
Example Request
POST /v1/clinic/notifications/appointment_reminders HTTP/1.1
Content-Type: application/json
X-User-Token: your_token_here
{
"appointment_reminder": {
"appointment_id": 789,
"reminder_type": "sms",
"send_at": "2023-10-27T12:00:00.000Z",
"message": "Reminder: You have an appointment tomorrow at 2:30 PM",
"language": "en"
}
}Reminder Types
Available reminder types:
sms- SMS text message reminderemail- Email reminderpush- Push notification (mobile app)voice- Voice call reminderall- Send all available reminder types
Response Format
Appointment Reminder Response
{
"id": 456,
"appointment_id": 789,
"reminder_type": "sms",
"status": "scheduled",
"send_at": "2023-10-27T12:00:00.000Z",
"sent_at": null,
"message": "Reminder: You have an appointment tomorrow at 2:30 PM",
"language": "en",
"delivery_status": "pending",
"created_at": "2023-10-26T10:00:00.000Z",
"updated_at": "2023-10-26T10:00:00.000Z"
}Reminder Status Values
scheduled- Reminder is scheduled to be sentsent- Reminder has been sentdelivered- Reminder was successfully deliveredfailed- Reminder delivery failedcancelled- Reminder was cancelled
Delivery Status Values
pending- Waiting to be sentsending- Currently being sentdelivered- Successfully deliveredfailed- Delivery failedbounced- Message bounced backunsubscribed- Recipient has unsubscribed
Default Reminder Schedule
If no send_at time is specified, reminders are sent according to the default schedule:
- 24 hours before appointment - Email reminder
- 2 hours before appointment - SMS reminder
- 30 minutes before appointment - Push notification (if app installed)
Error Responses
422 Unprocessable Entity
{
"errors": {
"appointment_id": ["can't be blank", "must exist"],
"reminder_type": ["is not included in the list"],
"send_at": ["must be in the future"]
}
}404 Not Found
{
"errors": "Appointment not found"
}403 Forbidden
{
"errors": "You are not authorized to send reminders for this appointment"
}Notes
- Reminders are automatically scheduled when appointments are created
- Custom messages should be concise and include essential appointment details
- Language codes follow ISO 639-1 standard (e.g., “en”, “es”, “fr”)
- SMS reminders may incur charges based on your messaging plan
- Patients can opt out of specific reminder types through their preferences
- Failed reminders may be automatically retried based on system configuration