Sort

All list endpoints accept an optional sort query parameter, which defines the order of the records returned.

Syntax

The sort parameter is a JSON array with exactly two elements: the field name and the direction.

sort=["name","DESC"]
  • The field must be one of the fields listed in the Sort fields section of the endpoint.
  • The direction is either ASC (ascending) or DESC (descending), and is not case-sensitive.

Results can be sorted by a single field. When two or more records have the same value for the sort field, the API applies a second, fixed sort field (usually the name or the record ID, in the same direction), so the order is always stable. This is important when paginating, since it guarantees that no record is skipped or repeated between pages.

Default sort order

When sort is omitted, results are sorted by the default field of the endpoint, in ascending order. The default field is shown in the Sort fields section of each list endpoint. For example, campaigns are sorted by name, and call details are sorted by startedAtLocal.

Errors

A 400 Bad Request error is returned when:

  • The array doesn't contain exactly two elements.
  • The direction is not ASC or DESC.
  • The field is not a valid sort field for the endpoint. The error message includes the list of valid fields.
GET

/v1/accounts/ACCOUNT_ID/campaigns

curl -G 'https://api.sipcaller.com/v1/accounts/ACCOUNT_ID/campaigns' \ -H 'Authorization: Bearer API_KEY_TOKEN' \ --data-urlencode 'sort=["startDate","DESC"]'

Response

200 OK

[ { "id": "01a0dd41-88f7-7b21-9e52-2c0d9ba1c7f3", "name": "October Renewals", "startDate": "2026-10-01" ... }, { "id": "0192831a-fbbe-735f-b385-a3252781817d", "name": "Q3 Sales Follow-up", "startDate": "2026-09-01" ... } ]


SIP Caller
© 2026 Easy Caller LLC All Rights Reserved
LinkedinYou Tube
Trustpilot