Skip to content

List messages, newest first

GET/v1/messagesKey · read

List messages, newest first (scope read).

Authentication

API key: Authorization: Bearer sl_live_… with the read scope. The dashboard session works too.

An API key always acts in its own workspace. With a dashboard session, pass ?workspaceId= to choose the workspace (default: your first).

Parameters

NameInDescription
contactquery

string

statusquery

"queued" | "dispatched" | "accepted" | "sent" | "delivered" | "failed" | "received"

deviceIdquery

string

directionquery

"outbound" | "inbound"

cursorquery

string — nextCursor from the previous page.

limitquery

integer

Response

200 — A page of messages

FieldDescription
messagesarray of Message
nextCursorstring | null
200 example (values are illustrative)
{
"messages": [
{
"id": "msg_4e03f88dc3ae3e703ee205e19b5ad9c7",
"direction": "outbound",
"status": "queued",
"finalStatus": false,
"channel": "sms",
"contact": "+12125550142",
"body": "Hi Maya, your order #1042 is ready for pickup.",
"deviceId": "dev_8fK2mQ4xR7sT1bV6hN3cYw",
"simSlot": 0,
"parts": 1,
"attempt": 1,
"errorCode": "errorCode",
"idempotencyKey": "order-1042-ready",
"apiKeyId": "apiKeyId",
"userId": "userId",
"agentId": "agentId",
"createdAt": "2026-11-28T09:13:57.390Z",
"updatedAt": "2026-11-28T09:13:57.390Z",
"sentAt": "2026-11-28T09:13:57.390Z",
"deliveredAt": "2026-11-28T09:13:57.390Z",
"readAt": "2026-11-28T09:13:57.390Z"
}
],
"nextCursor": "eyJ0IjoiMjAyNi0xMS0yOCJ9"
}

Errors

Errors are JSON: {"error": "<code>", "message": "<a sentence>"}. Branch on error, show message. Every code is explained in Errors.

StatuserrorWhen
400bad_requestInvalid filter or cursor
401unauthorizedMissing or invalid API key / session
403forbiddenAPI key lacks the required scope
500internalInternal error

Examples

Set SIMLINE_API_KEY to your key first. Node examples use the built-in fetch (Node 18+, run as an ES module); Python uses requests.

Terminal window
curl "https://api.simline.dev/v1/messages" \
-H "Authorization: Bearer $SIMLINE_API_KEY"