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

The Message object

Messages with patients: send to a patient by ID or phone number, read patient messages by time range, and check delivery. Patient API.

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-messagesList patient messages
POST/patient-messagesSend a message to a patient
POST/messages:batchSend messages to patients in a batch
GET/patient-messages/{messageId}Retrieve a patient message
GET/me/messagesList messages
GET/me/messages/{messageId}Retrieve a message
POST/me/conversations/{conversationId}/messagesSend a message
Last updated on