Messagesv4.1

List chat messages

GET/chats/{chatId}/messages

Lists messages in a chat, newest first by default. Use order=asc for oldest first.

Path parameters

chatIdRequiredstring

Unique identifier of the chat, prefixed with chat_. Returned by the List chats endpoint.

Headers

AuthorizationRequiredstring

Your API key, sent as a bearer token: Authorization: Bearer <api_key>. Editing this stays in sync with the API key box on the right.

Bearer

Query parameters

orderoptionalstring
"asc""desc"
limitoptionalinteger

Maximum number of items to return per page. Must be between 1 and 200; defaults to 50. Combine with cursor to paginate.

cursoroptionalstring

Opaque pagination cursor. Pass the next_cursor value from a previous response to fetch the next page; omit it on the first request.

Returns

dataoptionalMessage[]

Array of Message

idoptionalstring

Message id (msg_...).

chat_idoptionalstring
channel_idoptionalstring
channel_typeoptionalstring
"blooio""twilio""whatsapp""whatsapp_business""rcs_business""amb""sms""voice"
channel_addressoptionalstring | null

The address of your own line on this channel (the sending/receiving number or alias, e.g. +15559876543). Same value regardless of direction; sender/recipient tell you which side of the conversation it is on.

protocoloptionalstring

Transport state or resolved wire service; never null. pending = accepted and dispatched, wire service not resolved yet; imessage / rcs / sms = the device-confirmed transport (iMessage blue bubble, RCS, or SMS/MMS green bubble); whatsapp = sent over P2P WhatsApp; whatsapp_business = sent over the WhatsApp Business Platform (WABA); rcs_business = sent over Blooio RCS, from a verified RCS business sender; amb = sent over Apple Messages for Business; unknown = accepted but the transport could not be resolved before the tracking window closed (see error).

"pending""unknown""imessage""sms""rcs""whatsapp""whatsapp_business""rcs_business""amb"
directionoptionalstring
"inbound""outbound"
senderoptionalstring | null

Who the message is FROM, direction-aware. On inbound this is the other party (the contact who messaged you, or in a group the participant who wrote it); on outbound this is your own line (channel_address). This is the SAME field delivered on the message webhooks, so a message reads identically via REST or webhook.

recipientoptionalstring | null

Who the message is TO, direction-aware. On inbound this is your own line (channel_address); on outbound this is the other party. The mirror of sender. Matches the message webhook shape.

contactoptionalContactSummary | null

The other party (never your own line), regardless of direction — so you always know who the message is with. On an inbound group message it is the member who sent it; null on a message you sent to a group. Matches the message webhook shape.

ContactSummary
contact_idRequiredstring | null

The contact (ct_...). null when no contact record matches the identifier.

identifierRequiredstring

The contact's identifier (phone number, email, or handle).

nameRequiredstring | null

The contact's name. null when none is on file. On a webhook it is a snapshot from when the event happened; read the contact for current details.

null
groupoptionalGroupSummary | null

The group, when the message is in a group chat. null in a 1:1 chat. Matches the message webhook shape.

GroupSummary
group_idRequiredstring

Group id (grp_...).

nameRequiredstring | null

The group's name. null when it has none.

null
typeoptionalstring

Content type, e.g. text, media, poll, sticker.

textoptionalstring | null

The plain text of the message — what the recipient actually sees. On a rich-text message the styling delimiters are NOT included here; see formatted_text.

formatted_textoptionalstring

Markdown for a rich-text (bold/italic/underline/strikethrough) message. Omitted entirely when the message carries no styling, so its presence is how you detect rich text. Present in both directions: on an outbound send made with format: "markdown", and on an inbound iMessage whose sender styled their text — so styling a customer applied in Messages arrives here even though your integration never asked for it. Always a normalized re-serialization of the message's actual styling rather than an echo of the source string: bold is spelled **, italic *, underline ++, strikethrough ~~, and any character that would otherwise read as a delimiter is backslash-escaped. Re-sending this value verbatim with format: "markdown" reproduces the same styled message. Blooio iMessage only. This is the SAME field delivered on the message webhooks, so a message reads identically via REST or webhook.

statusoptionalstring

Delivery lifecycle state: pending (accepted, waiting behind the channel's opener until the contact answers it), queued (accepted, awaiting dispatch), sent (handed to the channel; protocol resolves around here), delivered (delivery receipt received), read (read receipt received), failed (see error), superseded (row replaced by an idempotency retry, a poll-vote supersession, or, for a message that waited behind an opener, the fallback sent because the contact's device couldn't show it). Inbound messages surface via the event feed / webhooks with received.

reply_to_message_idoptionalstring | null
erroroptionalMessageError

Why the message failed; null unless it failed. On a blooio channel code is a MessageErrorCode and message describes it. On any other channel both are the provider's own error. See [Errors](/errors#v4-message-errors).

codeRequiredMessageErrorCode | string | null
messageRequiredstring | null

A description of the failure.

attachmentsoptionalobject[]

Ordered attachments on the message. Each entry is retrievable directly: url (servable, decrypted URL — inbound Apple Messages for Business media is downloaded, decrypted, and re-hosted before this is populated), media_type (content type), size (bytes), and an optional caption. Always present (empty array when there are none). Matches the webhook attachments shape exactly.

Array of object

urloptionalstring | null
media_typeoptionalstring | null
sizeoptionalinteger | null
captionoptionalstring | null
interactiveoptionalobject

Structured interactive content, present on interactive messages. For an inbound reply this is the customer's actual selection (role: reply): kind (quick_reply/list_picker/time_picker/form/…), chosen (the selected option titles / time slots / flattened answers), selected ({ id, title } for a single pick, where id is the id/identifier you set on the option; an Apple Messages for Business quick reply adds index), selections (an array of { id, title } instead of selected when the customer picked several rows of an Apple Messages for Business list picker) and, for Form Messages, a structured responses array (per-page question + typed answers per §17.4). For an outbound send it is the prompt that was sent (role: prompt). The message's text remains a flattened convenience summary alongside this structure. The message.received webhook carries the same kind, chosen, selected, selections and responses; on Apple Messages for Business it adds request_identifier and Apple's raw reply as detail.

imessage_appoptionalobject

Present on imessage_app messages (custom app bubbles): the app's bundle_id, team_id and app_name, the app-state url its extension reads, caption / subcaption, and the bubble's session_id. The same object the message webhooks carry.

stickeroptionalobject

Present on sticker messages, in both directions. The sticker file is the message's one attachment, stored as sent (a received HEICS sticker stays animated). The same object the message webhooks carry.

placed_onRequiredstring | null

Id of the message the sticker is placed on. null for a standalone sticker, or when it was placed on a message Blooio doesn't have.

part_indexRequiredinteger | null

Which part of the target message it is placed on. null for a standalone sticker.

placementRequiredobject | null

Where it sits on the bubble: x and y (center, as fractions of the bubble), scale, rotation (radians) and width (points). null for a standalone sticker.

xoptionalnumber
yoptionalnumber
scaleoptionalnumber
rotationoptionalnumber
widthoptionalnumber
rich_cardoptionalobject

Blooio RCS: the cards a rich_card message was sent with. The message webhooks carry it too.

cardsoptionalRcsCard[]

Array of RcsCard

titleoptionalstring
descriptionoptionalstring
mediaoptionalobject
urlRequiredstring

A public http(s) image or video URL. The files of all a message's cards can total at most 5 MB.

heightoptionalstring
"short""medium""tall"
suggestionsoptionalRcsSuggestion[]

Array of RcsSuggestion

suggestionsoptionalRcsSuggestion[]

Blooio RCS: the chips the message was sent with. The message webhooks carry them too.

Array of RcsSuggestion

typeRequiredstring
"reply""open_url""dial""view_location""share_location""create_calendar_event"
textRequiredstring

The chip's label.

idoptionalstring

Returned as interactive.selected.id when the chip is tapped. Defaults to text.

urloptionalstring

open_url: the http(s) URL to open.

phone_numberoptionalstring

dial: the E.164 number to call.

latitudeoptionalnumber

view_location: with longitude, the point to show.

longitudeoptionalnumber
queryoptionalstring

view_location: a place to search for, instead of a point.

labeloptionalstring

view_location: the pin's label.

titleoptionalstring

create_calendar_event: the event's title.

start_timeoptionalstring

create_calendar_event: ISO 8601.

end_timeoptionalstring

create_calendar_event: ISO 8601, after start_time.

descriptionoptionalstring

create_calendar_event: the event's notes.

routingoptionalobject

Apple Messages for Business inbound only: the entry-point ids Apple attached because the customer started this message from a link, QR code, or Messages button carrying biz-intent-id / biz-group-id. Present only on that message; later replies in the conversation don't repeat it. The same object the message.received webhook carries.

intent_idoptionalstring

The entry point's biz-intent-id.

group_idoptionalstring

The entry point's biz-group-id.

localeoptionalstring

Apple Messages for Business inbound only: the customer's language and region as Apple reports it, an ISO 639-1 language and ISO 3166 region joined by _. Omitted on every other message. The message.received webhook carries it too.

created_atoptionalinteger
updated_atoptionalinteger
has_moreoptionalboolean
next_cursoroptionalstring | null

Response codes

200A page of messages
401Your API key is missing or invalid. Pass it as a bearer token.
404No message was found with the provided `chatId`.

Sends a live request with your values and shows the real response below. Your key is stored only in this browser.

Request
curl -X GET https://api.blooio.com/v4.1/chats/chat_a1b2c3d4/messages?order=desc&limit=50&cursor=string \
Response objectexample
{  "data": [    {      "id": "msg_a1b2c3d4",      "chat_id": "chat_a1b2c3d4",      "channel_id": "ch_a1b2c3d4",      "channel_type": "blooio",      "channel_address": "123 Main St",      "protocol": "pending",      "direction": "inbound",      "sender": "string",      "recipient": "string",      "contact": {        "contact_id": "ct_a1b2c3d4",        "identifier": "+15551234567",        "name": "Jane Doe"      },      "group": {        "group_id": "grp_a1b2c3d4",        "name": "Jane Doe"      },      "type": "string",      "text": "Hello from Blooio!",      "formatted_text": "string",      "status": "active",      "reply_to_message_id": "msg_a1b2c3d4",      "error": {        "code": null,        "message": "Hello from Blooio!"      },      "attachments": [        {          "url": "https://example.com",          "media_type": "string",          "size": 50,          "caption": "Hello from Blooio!"        }      ],      "interactive": {},      "imessage_app": {},      "sticker": {        "placed_on": "string",        "part_index": 0,        "placement": {          "x": 0,          "y": 0,          "scale": 0,          "rotation": 0,          "width": 0        }      },      "rich_card": {        "cards": [          {            "title": "Example title",            "description": "Example description",            "media": {              "url": null,              "height": null            },            "suggestions": [              null            ]          }        ]      },      "suggestions": [        {          "type": "open_url",          "text": "Track order",          "url": "https://acme.com/orders/1234"        }      ],      "routing": {        "intent_id": "order_status",        "group_id": "post_sales"      },      "locale": "en_US",      "created_at": 0,      "updated_at": 0    }  ],  "has_more": true,  "next_cursor": "string"}