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
| Parameter | Type | Description |
|---|---|---|
sort_by | string | Field to sort by (e.g. first_name, email, date) |
order | string | asc 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).
| Parameter | Type | Description |
|---|---|---|
since | Unix timestamp | Records modified at or after this time |
until | Unix timestamp | Records modified at or before this time |
modified_since | Unix timestamp | Only records modified since this time |
unmodified_since | Unix timestamp | Only records unmodified since this time |
date_filter | Unix timestamp | Filter 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_pagewalk it. - Use
modified_sincefor 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.
What to read next
- 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.