Sorting

It is possible to sort GET method results using the sort and direction query parameters.

  • sort — the field to sort by (e.g. createdAt, name). Available sort fields are described per endpoint.
  • directiondesc (default) or asc. Must be used together with sort.

Example: GET https://api.omnisend.com/api/segments?sort=createdAt&direction=desc

Note: Sort parameters are only required on the first request. Subsequent requests using a cursor automatically apply the sort settings encoded in the cursor.