Read messages
get_messagesRetrieve SMS messages from your textbee account to check replies, verification codes, and delivery status. Supports paginated polling, direction filtering, and per-device queries.
Instructions
Read the SMS messages on the user's textbee account, covering every device, no device id needed. direction defaults to "received": checking for a reply or a one-time code is the usual case. Pass direction "sent" to review what went out (each row carries its delivery status), or "all" for a conversation in order. Pass the sms_batch_id from a send to see that send's per-recipient delivery status. To poll for new messages without missing or repeating any: use order "asc" with a from bound, then keep calling with the next_cursor each result prints. from is inclusive and to is exclusive, so consecutive windows tile exactly. Reading does not consume the plan send quota. Messages reach textbee within a few seconds of arriving on the phone, so when waiting for a code, wait briefly and call again rather than tight-polling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Exclusive upper bound, same format as from. Exclusive so consecutive windows never double-count a boundary message. | |
| from | No | Inclusive lower bound on when textbee stored the message. ISO 8601 with an explicit timezone, for example 2026-08-20T00:00:00Z. | |
| limit | No | Messages per call, 1 to 100. Default 25. | |
| order | No | desc (default) for newest first; asc to walk forward in time when polling. | |
| cursor | No | Opaque position from a previous result's next_cursor. Returns messages after that position, with no repeats and no gaps. | |
| search | No | Free text match across the message body and the other party's number. Use this instead of paging when looking for a specific code or keyword. Encrypted messages cannot be searched. | |
| direction | No | Which direction to return. Defaults to "received" ("all" when sms_batch_id is set, since a batch's messages are outbound). "sent" reviews outgoing messages and their delivery status. | |
| device_ids | No | Only messages from these devices. Ids come from list_devices. Omit for every device. | |
| sms_batch_id | No | Only messages from this batch, using the sms_batch_id a send returned. This is how to check a send's delivery: each row carries its status. |