Skip to main content

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

PhaseBehavior
TriageWaits for AI triage response before returning
ActiveReturns immediately (messaging is asynchronous)

Parameters

ParameterTypeRequiredDescription
conversationIdstringYesThe conversation ID
messagesarrayNoText message(s) to send
mediaobjectNoPhoto 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"
  }
}

Media Types

TypeSupported Content Types
photoimage/jpeg, image/png, image/heic
videovideo/mp4, video/quicktime

Media Upload Flow

  1. Call send_message with media parameter
  2. Receive uploadUrl and messageId in response
  3. Upload file to uploadUrl (PUT request with Content-Type header)
  4. 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"
  }
}

Returns (Media Upload)

{
  "messageId": "msg_xyz789",
  "uploadUrl": "https://upload.arlohealth.ai/...",
  "expiresIn": 3600
}

get_media_url

Get a downloadable URL for media attached to a message.

Parameters

ParameterTypeRequiredDescription
conversationIdstringYesThe conversation ID
messageIdstringYesThe message ID containing the media
mediaTypestringYesphoto, video, or file
fileNamestringFor filesRequired 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"
});