Skip to Content
API access is available to organizations with a signed BAA. Request API access →
API referenceThe Conversation object

The Conversation object

Conversations with patients, one per patient and clinic phone number. Patient API.

Attributes

idUUIDRequired

Unique ID of the conversation.

organization_idUUIDRequired

Organization the conversation belongs to.

typepatient, direct, group, broadcastRequired

A conversation with a patient, or a staff direct message, group, or broadcast. API keys see only patient.

titlestringRequired

The conversation’s name as the user sees it in BloomText.

patientPatientRef or null

The patient, for patient conversations. Null otherwise.

Show child attributes
idUUIDRequired

ID of the patient.

namestringRequired

The patient’s name, or their phone number if they have no name yet.

phone_numberPhoneNumberRef or null

The clinic phone number, for patient conversations by SMS. Null otherwise.

Show child attributes
numberstringRequired

The phone number.

teamstringRequired

The team it belongs to.

channelsecure, sms, null

How the patient receives messages, for patient conversations. Null otherwise.

created_attimestampRequired

When the conversation was created.

last_message_attimestamp or nullRequired

When the latest message was sent. Null for a conversation with no messages.

unread_countintegerRequired

Always 0 with an API key, which has no read state. With OAuth, messages the person hasn’t read.

seen_attimestamp or nullRequired

Always null with an API key. With OAuth, when the person last read the conversation.

messages_in_rangeinteger or null

On List conversations with after or before: how many of its messages fell in the range. Null otherwise.

latest_messageMessage or null

On List conversations: the conversation’s latest message in the range. Null otherwise.

Show child attributes
idUUIDRequired

Unique ID of the message.

conversationConversationRefRequired

The conversation a message belongs to.

Show child attributes
idUUIDRequired

ID of the conversation.

titlestringRequired

The conversation’s name as the user sees it.

senderSenderRequired

Who sent a message.

Show child attributes
idUUIDRequired

ID of the sender.

namestringRequired

The sender’s display name.

kindstaff, patient, api_key, api_identityRequired

A staff member, a patient, an API key (name is the key’s name, like “Reminder service”), or an API identity (the automated sender the key belongs to, like “Appointment reminders”; not a staff member).

patientPatientRef or nullRequired

The patient in the conversation, for patient conversations. Null otherwise.

Show child attributes
idUUIDRequired

ID of the patient.

namestringRequired

The patient’s name, or their phone number if they have no name yet.

channelapp, secure, smsRequired

How the message traveled: inside BloomText (app), by secure link, or by plain SMS.

phone_numberPhoneNumberRef or null

The clinic phone number, for SMS messages. Null otherwise.

Show child attributes
numberstringRequired

The phone number.

teamstringRequired

The team it belongs to.

deliveryDelivery or null

Delivery status, for messages sent to a patient. Null otherwise.

Show child attributes
statusqueued, sent, delivered, failed, undelivered, rejected, consent_requestedRequired

Where the message is: queued (accepted, not yet with the carrier), sent (with the carrier, or a secure message sent), delivered (the carrier confirmed it), failed or undelivered (it didn’t reach the patient), rejected (BloomText didn’t send it, because the patient opted out, the carrier blocks texts to them, an admin blocked the number, the number can’t receive texts, the organization requires consent and the patient hasn’t given it, or the text waited for consent and wasn’t sent), or consent_requested (the organization requires consent before texting: BloomText asked the patient, and the message goes when they reply YES). For a message to several patients, the worst of theirs: failed if any failed, delivered only when all were.

error_codestring or null

Why it wasn’t delivered: the carrier’s code, like 30005, or BloomText’s reason: patient_opted_out, carrier_blocked, number_blocked, number_unreachable, consent_required (the organization requires consent and the patient hasn’t given it) or consent_not_sent (the text waited for consent and wasn’t sent). Null otherwise.

detailstring or null

What error_code means, in plain English. Null when there’s no error.

updated_attimestampRequired

When the status last changed. Carrier reports arrive within minutes.

recipientsarray of object

For a message to several patients (a group conversation), each one’s delivery. Absent for one patient.

campaign_idUUID or null

The campaign that sent this message. Null otherwise.

created_attimestampRequired

When the message was sent.

edited_attimestamp or null

When the message was last edited. Null if it never was.

typetext, fileRequired

Whether the message carries text or a file.

bodystring or null

Message text. Null for file messages.

fileFileReference or null

File metadata. Null for text messages.

Show child attributes
idUUIDRequired

Unique ID of the file.

namestringRequired

Original file name.

mimestring or null

MIME type, such as application/pdf.

size_bytesinteger or null

File size in bytes.

reply_to_message_idUUID or null

Message this is a reply to. Null for top-level messages.

unreadbooleanRequired

Always false with an API key, which has no read state. With OAuth, whether the connected person hasn’t read it.

sent_viaApp or null

Null for messages sent in BloomText or with an API key. With OAuth, the app that sent it for the connected person; staff see this, patients don’t.

Show child attributes
client_idstringRequired

Your app’s OAuth client ID.

namestringRequired

Your app’s name as users and staff see it.

Endpoints

MethodPathEndpoint
GET/patient-conversationsList patient conversations
GET/patient-conversations/{conversationId}Retrieve a patient conversation
GET/me/conversationsList conversations
GET/me/conversations/{conversationId}Retrieve a conversation
Last updated on