Skip to main content
Search endpoints accept an optional sortBy string in the request body to control result ordering.

Request shape

If sortBy is omitted, the API uses the endpoint’s default ordering.

Expression syntax

sortBy uses the same expression parser as query, but only sorting functions are allowed.

Single field

Multiple fields

Chain sort keys with sort(...):

Attribute fields

Sort by a contact attribute using getBy:
Field names are case-sensitive. Each search endpoint documents its sortable fields on the sortBy property in the API reference.