List messages
Returns a paginated list of SMS messages for the authenticated user account, with optional filtering by message folder and configurable field projection views.
GET /api/v2/messages
Table of contents
Endpoint summary
| Property | Value |
| HTTP method | GET |
| Endpoint path | /api/v2/messages |
| Authentication | Authorization: Bearer <api_key> or Authorization: Basic <base64(username:password)> |
| Success status code | 200 OK |
Note: When folder is omitted, messages across all folders (inbox, outbox, postponed, sent, notsent, deleted) are returned. By default (view=basic), payload content fields (content, hexContent, userDataHeader, dataCoding) are omitted; pass view=full to include message payloads.
Request
Request headers
| Header | Required | Description |
Authorization |
Yes | Credentials identifying the user account context (Bearer <api_key> or Basic <credentials>). |
Query parameters (ListMessagesQueryParams)
| Parameter | Type | Required | Default | Description |
folder |
string | Optional | null (all) |
Target folder filter: "inbox", "outbox", "postponed", "sent", "notsent", or "deleted". If omitted, messages from all folders are returned. |
limit |
integer | Optional | 100 |
Maximum number of records to return per page. Must be an integer between 1 and 1000. |
offset |
integer | Optional | 0 |
Number of records to skip before starting to collect the result set. Must be a non-negative integer (>= 0). |
view |
string | Optional | "basic" |
Controls which fields are projected on each message item: "basic", "status_only", or "full". |
View projections (MessageView)
| View | Included fields |
"basic" (default) |
Returns core message metadata (messageId, folder, from, to, type, createdAt, scheduledAt, expiresAt) and delivery status (status, statusDescription, updatedAt), omitting payload body fields (content, hexContent, userDataHeader, dataCoding). |
"status_only" |
Returns only messageId and delivery status fields (status, statusDescription, updatedAt). For inbox or deleted messages where delivery status does not apply, only messageId is returned. |
"full" |
Returns the complete message representation, including core metadata, delivery status, and payload fields (content for "SMS:TEXT", or hexContent, userDataHeader, and dataCoding for "SMS:BINARY"). |
Message folders
| Folder | Description |
inbox |
Messages received from external mobile subscribers by the gateway. |
outbox |
Messages submitted by API clients and queued for immediate outbound dispatch. |
postponed |
Messages scheduled for deferred outbound dispatch (scheduledAt > createdAt). |
sent |
Outbound messages submitted to the network or delivered to recipients. |
notsent |
Outbound messages that were rejected or failed submission to the provider. |
deleted |
Outbound messages cancelled or deleted. |
Response
200 OK
Returns a ListMessagesResponse object containing the array of matching message records and pagination metadata.
Root object (ListMessagesResponse)
| Field | Type | Description |
messages |
object[] (MessageResponse[]) |
Array of message records matching the query criteria, projected according to view. |
pagination |
object (PaginationMetadata) |
Pagination metadata for navigating the result set. |
messages[] item object (MessageResponse)
Properties with null values are omitted from the serialized JSON output.
| Field | Type | Views | Folders | Description |
messageId |
string (UUID) | basic, status_only, full |
All | Unique identifier of the message. |
folder |
string | basic, full |
All | Message folder ("inbox", "outbox", "postponed", "sent", "notsent", or "deleted"). |
from |
string | basic, full |
All | Sender phone number (E.164) or alphanumeric sender ID. Omitted if null or empty. |
to |
string | basic, full |
All | Destination recipient phone number. |
type |
string | basic, full |
All | Message payload type ("text" or "binary"). |
content |
string | full |
All | Text payload content. Present only when view=full and type is "text". |
hexContent |
string | full |
All | Hexadecimal-encoded binary payload. Present only when view=full and type is "binary". |
userDataHeader |
string | full |
All | Hexadecimal-encoded User Data Header (UDH). Present only when view=full, type is "binary", and UDH was set. |
dataCoding |
integer | full |
All | Data coding scheme (DCS). Present only when view=full and type is "binary". |
status |
string | basic, status_only, full |
outbox, postponed, sent, notsent |
Delivery status state ("queued", "rejected", "submitted", "partiallysubmitted", "submitfailed", "delivered", "partiallydelivered", "deliveryfailed", "viewed"). Omitted for "inbox" or "deleted" folders. |
statusDescription |
string | basic, status_only, full |
outbox, postponed, sent, notsent |
Human-readable explanation corresponding to status. Omitted for "inbox" or "deleted" folders. |
updatedAt |
string (ISO 8601) | basic, status_only, full |
outbox, postponed, sent, notsent |
Timestamp of the last delivery status transition. Omitted for "inbox" or "deleted" folders. |
createdAt |
string (ISO 8601) | basic, full |
All | Timestamp when the message was created or received. |
scheduledAt |
string (ISO 8601) | basic, full |
All | Scheduled dispatch timestamp. |
expiresAt |
string (ISO 8601) | basic, full |
All | Expiration deadline timestamp. |
pagination object (PaginationMetadata)
| Field | Type | Description |
limit |
integer | Maximum number of items requested (or defaulted to 100). |
offset |
integer | Number of items skipped from the beginning of the matching set. |
total |
integer | Total number of matching records available across the queried folder(s). |
Error responses
When authentication fails or any query parameter (folder, limit, offset, view) is invalid, the API returns a structured ApiErrorResponse object.
Common error status codes:
| Status code | Condition | Description |
401 Unauthorized |
Missing or invalid credentials | Authentication credentials were not provided or could not be resolved to an active user. |
422 Unprocessable Entity |
Invalid query parameter | One of folder, limit, offset, or view failed validation. |
Error schema (ApiErrorResponse):
| Field | Type | Description |
error.code |
integer | HTTP status code (e.g., 401, 422). |
error.description |
string | Explanation of the specific error condition. |
error.action |
string | Recommended action to resolve the error. |
error.timestamp |
string (ISO 8601) | Timestamp when the error occurred. |
Examples
1. List messages across all folders (view=full)
Retrieves up to 100 messages across all folders with full payload details included.
Request:
GET /api/v2/messages?limit=100&offset=0&view=full HTTP/1.1 Host: localhost:9509 Authorization: Bearer <api_key>
Response (200 OK):
{
"messages": [
{
"messageId": "26385eed-6a6c-4deb-b549-dc055211a71d",
"folder": "inbox",
"from": "+36201002000",
"to": "+36201002001",
"type": "text",
"content": "Message 1 goes to 1 number",
"createdAt": "2026-10-21T10:21:00+02:00",
"scheduledAt": "2026-10-21T10:21:00+02:00",
"expiresAt": "2026-10-28T10:21:00+02:00"
},
{
"messageId": "8f3b2a1c-9d4e-4f5a-b6c7-1a2b3c4d5e6f",
"folder": "sent",
"from": "+36201003000",
"to": "+36201003001",
"type": "text",
"content": "Message 2 goes to 2 number",
"status": "delivered",
"statusDescription": "Delivered",
"updatedAt": "2026-10-21T10:21:00+02:00",
"createdAt": "2026-10-21T10:20:00+02:00",
"scheduledAt": "2026-10-21T10:20:00+02:00",
"expiresAt": "2026-10-28T10:20:00+02:00"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 2
}
}
2. List incoming messages in inbox (folder=inbox&view=full)
Retrieves only incoming SMS messages from the inbox folder with full message content.
Request:
GET /api/v2/messages?folder=inbox&limit=100&offset=0&view=full HTTP/1.1 Host: localhost:9509 Authorization: Bearer <api_key>
Response (200 OK):
{
"messages": [
{
"messageId": "26385eed-6a6c-4deb-b549-dc055211a71d",
"folder": "inbox",
"from": "+36201002000",
"to": "+36201002001",
"type": "text",
"content": "Message 1 goes to 1 number",
"createdAt": "2026-10-21T10:21:00+02:00",
"scheduledAt": "2026-10-21T10:21:00+02:00",
"expiresAt": "2026-10-28T10:21:00+02:00"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1
}
}
3. List outgoing queued messages in outbox (folder=outbox&view=full)
Retrieves outbound messages currently queued in the outbox folder.
Request:
GET /api/v2/messages?folder=outbox&limit=100&offset=0&view=full HTTP/1.1 Host: localhost:9509 Authorization: Bearer <api_key>
Response (200 OK):
{
"messages": [
{
"messageId": "37492ffd-7b7d-4efc-c65a-ed166322b82e",
"folder": "outbox",
"from": "+36201002000",
"to": "+36201002001",
"type": "text",
"content": "Queued outbound message",
"status": "queued",
"statusDescription": "Accepted for delivery",
"updatedAt": "2026-10-21T10:21:00+02:00",
"createdAt": "2026-10-21T10:21:00+02:00",
"scheduledAt": "2026-10-21T10:21:00+02:00",
"expiresAt": "2026-10-28T10:21:00+02:00"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1
}
}
4. List sent messages with default basic view (folder=sent)
Retrieves messages from the sent folder using the default basic view (metadata and delivery status, without payload content).
Request:
GET /api/v2/messages?folder=sent&limit=100&offset=0 HTTP/1.1 Host: localhost:9509 Authorization: Bearer <api_key>
Response (200 OK):
{
"messages": [
{
"messageId": "8f3b2a1c-9d4e-4f5a-b6c7-1a2b3c4d5e6f",
"folder": "sent",
"from": "+36201003000",
"to": "+36201003001",
"type": "text",
"status": "delivered",
"statusDescription": "Delivered",
"updatedAt": "2026-10-21T10:21:00+02:00",
"createdAt": "2026-10-21T10:20:00+02:00",
"scheduledAt": "2026-10-21T10:20:00+02:00",
"expiresAt": "2026-10-28T10:20:00+02:00"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1
}
}
5. List delivery statuses only (folder=sent&view=status_only)
Retrieves only messageId and delivery status fields for messages in the sent folder.
Request:
GET /api/v2/messages?folder=sent&limit=100&offset=0&view=status_only HTTP/1.1 Host: localhost:9509 Authorization: Bearer <api_key>
Response (200 OK):
{
"messages": [
{
"messageId": "8f3b2a1c-9d4e-4f5a-b6c7-1a2b3c4d5e6f",
"status": "delivered",
"statusDescription": "Delivered",
"updatedAt": "2026-10-21T10:21:00+02:00"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1
}
}
6. Error: Invalid limit parameter (422 Unprocessable Entity)
Returned when the limit query parameter is not an integer between 1 and 1000.
Response (422 Unprocessable Entity):
{
"error": {
"code": 422,
"description": "Parameter 'limit' value '-1' is invalid.",
"action": "Parameter 'limit' must be an integer between 1 and 1000.",
"timestamp": "2026-10-21T10:21:00+02:00"
}
}
7. Error: Invalid folder filter (422 Unprocessable Entity)
Returned when the folder query parameter specifies an unrecognized folder name.
Response (422 Unprocessable Entity):
{
"error": {
"code": 422,
"description": "Invalid folder filter 'archive'.",
"action": "Parameter 'folder' must be one of: 'inbox', 'outbox', 'postponed', 'sent', 'notsent', 'deleted'.",
"timestamp": "2026-10-21T10:21:00+02:00"
}
}