Skip to content

SmsGetMessages

GET sms/messages/list

Returns the message history of the brand, joined with provider, profile and template names. Supports the platform list contract: paging, sorting, grouping, aggregates and filters.

For spend and delivery reports prefer SmsGetStats: it aggregates on the server instead of paging raw rows.

Access Control

Allowed roles: admin, leader, manager. Scoped to the brand of the caller.

Request

GET request
GET https://{broker_domain}/sms/messages/list?limit=20&orderBy=%5B%22id%22%2C%22DESC%22%5D&where=%7B%22sendToParentId%22%3A140%7D&count=%5B%22id%22%5D
Authorization: <JWT_TOKEN>
{
  "command": "SmsGetMessages",
  "extID": "1",
  "data": {
    "limit": 20,
    "orderBy": [
      "id",
      "DESC"
    ],
    "where": {
      "sendToParentId": 140
    },
    "count": [
      "id"
    ]
  }
}
const res = await platform.SmsGetMessages({
  limit: 20,
  orderBy: [
    "id",
    "DESC"
  ],
  where: {
    sendToParentId: 140
  },
  count: [
    "id"
  ]
});

Request Data

Field Type Required Description
limit int No Page size, 1..1000, default 100
offset int No Rows to skip
orderBy array No Sorting, for example ["id", "DESC"]
groupBy array No Grouping, including date grouping such as DAY({field})
count array No Row count aggregate, ["id"]
sum array No Sum aggregate, for example ["parts", "price"]
where object No Filters; grouped orWhere is supported, see Table filter syntax

Response Data

count appears only when it was requested — a row count is an extra query, so it is opt-in.

{
  "rows": [
    {
      "id": 812,
      "brand": "default",
      "providerId": 1,
      "profileId": 3,
      "agentId": null,
      "profilePinned": false,
      "managerId": 10,
      "templateId": null,
      "triggerId": null,
      "sendToParentType": "CUSTOMER",
      "sendToParentId": 140,
      "phone": "380951234567",
      "phoneOriginal": "+380 95 123 45 67",
      "countryCode": "380",
      "countryIso": "UA",
      "senderId": "ScaleTrade",
      "message": "Your code is 4821",
      "encoding": "GSM7",
      "parts": 1,
      "status": "DELIVERED",
      "externalId": "prov-99213",
      "errorCode": null,
      "errorMessage": null,
      "price": 0.0032,
      "currency": "EUR",
      "kind": "TRANSACTIONAL",
      "attempts": 1,
      "campaignId": null,
      "closedBy": "PROVIDER",
      "sentAt": "2026-08-24 13:32:41",
      "deliveredAt": "2026-08-24 13:32:47",
      "createdAt": "2026-08-24 13:32:40"
    }
  ],
  "count": [ { "id": 128 } ]
}

Errors

Code Error Description
400 VALIDATION_ERROR Unknown field in a filter or aggregate