messages
Manage communication with patients and staff through messages associated with forms, packets, or standalone documents. Messages can be sent via email or SMS and can be scheduled for future delivery.
Capabilities
- List Messages: Retrieve a paginated list of messages sent by your team, with filters for patient, form, packet, delivery method, and status.
- Retrieve Message Details: Fetch detailed information about a specific message, including delivery status, associated form/packet, and message content.
- Create a Message: Send a new message to a patient, either immediately or at a scheduled time.
- Update Message: Modify message details, such as the scheduled delivery time or target contact information (only for unsent messages).
- Delete a Message: Cancel a message before it is sent.
Usage
- Use the
GET /messagesendpoint to list messages with optional filters (e.g.,form,patient,status). - Use the
POST /messagesendpoint to create a new message, specifying at least one ofform,packet, ordocument. - Use the
PUT /messages/{id}endpoint to update unsent messages, such as rescheduling the delivery time. - Use the
DELETE /messages/{id}endpoint to cancel unsent messages.
Example
curl --request POST \
--url https://api.app.zentake.com/v2/messages \
--header 'X-API-KEY: <your_api_key>' \
--header 'X-API-SECRET: <your_api_secret>' \
--data '{
"patient": "123456",
"form": "abc123",
"message_type": "form_response_request",
"preferred_delivery_method": "email",
"target_email": "patient@example.com",
"scheduled_at": "2025-05-10T15:00:00Z"
}'
Important Notes:
- The preferred_delivery_method must be specified as either
emailorsms. - If a message is scheduled, it will not be sent immediately but will be processed at the specified scheduled_at time.
List messages
Retrieve a paginated list of messages associated with the authenticated team.
Create a new message
Create a new message to be delivered to a patient.
Retrieve a specific message
Fetch a message by its unique identifier (`uid`).
Update a message
Update an existing message.
Partially update a message
Apply a partial update to a message.
Delete a message
Delete a message by its unique identifier (`uid`).
Partially update a scheduled message
Partially update a scheduled message by its parent message unique identifier (`uid`).