Skip to Content
Clinic APINotifications

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

ParameterTypeRequiredDescription
appointment_reminderobjectYesReminder data object
appointment_reminder.appointment_idintegerYesID of the appointment
appointment_reminder.reminder_typestringYesType of reminder (sms, email, push)
appointment_reminder.send_atstringNoWhen to send reminder (ISO 8601)
appointment_reminder.messagestringNoCustom reminder message
appointment_reminder.languagestringNoLanguage 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 reminder
  • email - Email reminder
  • push - Push notification (mobile app)
  • voice - Voice call reminder
  • all - 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 sent
  • sent - Reminder has been sent
  • delivered - Reminder was successfully delivered
  • failed - Reminder delivery failed
  • cancelled - Reminder was cancelled

Delivery Status Values

  • pending - Waiting to be sent
  • sending - Currently being sent
  • delivered - Successfully delivered
  • failed - Delivery failed
  • bounced - Message bounced back
  • unsubscribed - 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