Overview
Messaging tools handle sending messages in consultations and retrieving media attachments.
send_message
Send a message in an Arlo Health conversation.
Behavior by Conversation Phase
| Phase | Behavior |
|---|
| Triage | Waits for AI triage response before returning |
| Active | Returns immediately (messaging is asynchronous) |
Parameters
| Parameter | Type | Required | Description |
|---|
conversationId | string | Yes | The conversation ID |
messages | array | No | Text message(s) to send |
media | object | No | Photo or video to upload |
Text Messages
When responding to AI triage questions, write natural first-person responses that include context:
{
"conversationId": "conv_abc123",
"messages": ["No fever, but I've been feeling really tired and run down the past few days."]
}
Don’t just answer the specific question — include related details the user mentioned. Richer, natural responses help complete triage faster.
Multiple Messages
Use multiple items to batch related information:
{
"conversationId": "conv_abc123",
"messages": [
"No fever at all.",
"I've been drinking lots of water but still feel dehydrated.",
"The pain is worse when I swallow."
]
}
The AI responds after all messages are sent.
Photo/Video Messages
To send a photo or video, include the media parameter:
{
"conversationId": "conv_abc123",
"media": {
"type": "photo",
"contentType": "image/jpeg"
}
}
| Type | Supported Content Types |
|---|
photo | image/jpeg, image/png, image/heic |
video | video/mp4, video/quicktime |
- Call
send_message with media parameter
- Receive
uploadUrl and messageId in response
- Upload file to
uploadUrl (PUT request with Content-Type header)
- Message is automatically sent after upload completes
Returns (Text Message)
{
"messageId": "msg_xyz789",
"status": "sent",
"triageResponse": {
"content": "Have you noticed any swelling in your throat?",
"sender": "ai"
}
}
{
"messageId": "msg_xyz789",
"uploadUrl": "https://upload.arlohealth.ai/...",
"expiresIn": 3600
}
Get a downloadable URL for media attached to a message.
Parameters
| Parameter | Type | Required | Description |
|---|
conversationId | string | Yes | The conversation ID |
messageId | string | Yes | The message ID containing the media |
mediaType | string | Yes | photo, video, or file |
fileName | string | For files | Required for files: the file name from the message |
Returns
{
"url": "https://cdn.arlohealth.ai/...",
"expiresIn": 3600
}
The returned URL is signed and expires (typically in 1 hour). For files, you must also provide the fileName from the message.
Example: Download Photo
// Get message with photo from consultation status
const status = await getConsultationStatus({
conversationId: "conv_abc123",
includeMessages: true
});
// Find photo message
const photoMessage = status.messages.find(m => m.type === "photo");
// Get download URL
const { url } = await getMediaUrl({
conversationId: "conv_abc123",
messageId: photoMessage.id,
mediaType: "photo"
});
// Download or display the image
const image = await fetch(url);
Example: Download File
const { url } = await getMediaUrl({
conversationId: "conv_abc123",
messageId: "msg_xyz789",
mediaType: "file",
fileName: "lab_results.pdf"
});