Send Message
POST /messages
Sends an SMS or email to a patient.
Scope required: communication.write.sms (for SMS) or communication.write.email (for email)
Request Body
{
"channel": "sms",
"patient_id": "018f1a2b-3c4d-7e5f-a6b7-c8d9e0f1a2b3",
"message": "Your appointment is confirmed for tomorrow at 09:00.",
"subject": null
}
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | ✅ | sms | email |
patient_id | UUID | ✅ | Patient must belong to this clinic |
message | string | ✅ | Message body |
subject | string | — | Email only; defaults to clinic name |
Response 202
SMS
{
"data": {
"id": "018e1f2a-…",
"channel": "sms",
"status": "queued",
"recipient": "+905321234567"
}
}
Email
{
"data": {
"channel": "email",
"recipient": "ali@example.com",
"status": "queued",
"patient": { "id": "…", "full_name": "Ali Yılmaz" }
}
}
info
SMS delivery is synchronous — the status reflects the provider response. Email is always queued and delivered asynchronously.