Messages
4 endpoints in this category.
GET
/messages/conversationsGet Conversations
Get the list of email-based messaging conversations.
Authentication:Required —
Authorization: Bearer <token>Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
data | Conversation[] | Yes | Array of conversations |
Error Codes
| Status | Meaning |
|---|---|
401 | Unauthorized |
Code Examples
curl -X GET 'https://visitnote-api-production.up.railway.app/api/therapist/v1/messages/conversations' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'GET
/messages/:conversationIdGet Messages
Get messages for a specific conversation with pagination.
Authentication:Required —
Authorization: Bearer <token>Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
conversationId | integer | Yes | Conversation ID |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number |
per_page | integer | No | Messages per page |
Response Fields
| Name | Type | Required | Description |
|---|---|---|---|
data | ChatMessage[] | Yes | Array of messages |
Error Codes
| Status | Meaning |
|---|---|
404 | Conversation not found |
Code Examples
curl -X GET 'https://visitnote-api-production.up.railway.app/api/therapist/v1/messages/:conversationId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'POST
/messages/sendSend Message
Send an email-based message to a patient.
Authentication:Required —
Authorization: Bearer <token>Request Body
| Name | Type | Required | Description |
|---|---|---|---|
patient_email | string | Yes | Recipient email |
patient_name | string | Yes | Recipient name |
body | string | Yes | Message body |
subject | string | No | Email subject |
conversation_id | integer | No | Existing conversation ID (for replies) |
Error Codes
| Status | Meaning |
|---|---|
422 | Missing required fields |
Code Examples
curl -X POST 'https://visitnote-api-production.up.railway.app/api/therapist/v1/messages/send' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"patient_email": "your_patient_email",
"patient_name": "your_patient_name",
"body": "your_body",
"subject": "your_subject",
"conversation_id": "your_conversation_id"
}'PUT
/messages/:conversationId/readMark Conversation as Read
Mark all messages in a conversation as read.
Authentication:Required —
Authorization: Bearer <token>Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
conversationId | integer | Yes | Conversation ID |
Error Codes
| Status | Meaning |
|---|---|
404 | Conversation not found |
Code Examples
curl -X PUT 'https://visitnote-api-production.up.railway.app/api/therapist/v1/messages/:conversationId/read' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN'Sign in to access API docs
Full API reference is available to VisitNote subscribers.
Don't have an account? Start free trial