API

Sorting and time filters

Order list results with sort_by and order, and narrow them to a time range with since, until, and modified_since.

Last updated Jul 11, 2026

List endpoints return records in a default order. Two sets of query parameters let you change that: sorting by a field, and filtering by modification time.

Sort by field

ParameterTypeDescription
sort_bystringField to sort by (e.g. first_name, email, date)
orderstringasc or desc. Default is asc

Sort contacts by first name, Z to A:

curl -u "USER_ID:API_KEY" \
  "https://app.onepagecrm.com/api/v3/contacts.json?sort_by=first_name&order=desc"

Filter by time

Return only records that fall in a given time range. All values are Unix timestamps (seconds since the epoch).

ParameterTypeDescription
sinceUnix timestampRecords modified at or after this time
untilUnix timestampRecords modified at or before this time
modified_sinceUnix timestampOnly records modified since this time
unmodified_sinceUnix timestampOnly records unmodified since this time
date_filterUnix timestampFilter by a specific date field rather than modified time, when combined with since and until

By default since/until apply to the modified time. Pass date_filter to apply them to a specific date field on the record instead.

Fetch contacts modified in the last hour (shell computes the timestamp):

since=$(date -d '1 hour ago' +%s)
curl -u "USER_ID:API_KEY" \
  "https://app.onepagecrm.com/api/v3/contacts.json?modified_since=$since"

Tips

  • Combine with pagination. Sort and filter narrow the set; page/per_page walk it.
  • Use modified_since for incremental syncs. Store the timestamp of your last successful pull and pass it next time to fetch only what changed.
  • Timestamps are seconds, not milliseconds. A 13-digit value will look like the year 50,000+ and return nothing.
  • Pagination β€” walk a sorted, filtered list page by page.
  • API reference β€” which endpoints are lists, and their other filter parameters.
  • OQL β€” richer queries and aggregates when parameters aren’t enough.