Skip to Content
Notification APIDocs

Pagination and sorting

Paging, search and sort parameters of list endpoints.

List endpoints share the same query parameters and response shape.

GET …/messages?page=2&pageSize=50&search=jane@&sort=-createdAt&status=Failed

Parameters

ParameterRules
page1 or more. Default 1.
pageSize1 to 100. Default 20. Values out of range answer 400 (they are not clamped).
searchOptional, case-insensitive, trimmed. What it matches depends on the list (below).
sortUp to 2 comma-separated keys; a leading - sorts descending. Keys are case-sensitive. Unknown keys answer 400 with the allowed keys in errors.Sort.

Filters combine with AND.

Response

{
  "items": [],
  "page": 2,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3,
  "hasNextPage": true
}

Keep requesting page + 1 while hasNextPage is true. Results are ordered with a stable tie-breaker, so pages do not overlap.

Per list

EndpointFilterssearch matchesSort keysDefault sort
List messagesstatus, channel, priority, templateId, from, torecipient address prefix, subject contains, exact idempotencyKey, message idcreatedAt-createdAt
List dispatchesstatusrecipient address containsrecipient, status, createdAt-createdAt
List templateschannel, serviceProviderIdtemplate name containsname, createdAt, updatedAt-createdAt

Enum filters take the PascalCase values shown in Data types, for example status=PartiallyCompleted.

On this page