List contacts
Contacts of the site in ascending order of id (order=newest for the latest first), each with its e-mail, status, names, custom fields, tags, source and email_stats. Call it to find contacts by filters, to export them or to keep a copy in sync. One contact by id is get_contact; counts without the contacts are get_contacts_stats. Filters combine: every one given must match. Deleted contacts are not listed.
A page holds up to limit contacts; while next_cursor is set, pass it as cursor for the next page.
created_at is the date the contact was added at its source: imports and Shopify keep the original date, so created_at does not grow with the id.
To keep a copy in sync, walk the whole list with the cursor and no filters once. After that, pass updated_since set to the start of the previous walk minus a margin of a few minutes, and merge by id. The margin is required: a change may be stamped slightly earlier than it becomes visible. Deletions are not visible: a deleted contact simply disappears, so repeat the full walk now and then to notice them.
updated_since covers changes of the contact itself: its fields, status, tags or e-mail, and a restore. It misses the rest. A deletion is not listed, the contact disappears. Sending and opening e-mails, the e-mail quality check and segment tracking do not move updated_at, so email_stats changes without it. A contact not changed since changes began to be recorded, created in the admin, or the account owner's contact added with the site has updated_at equal to created_at and is not found by updated_since, even when its created_at is newer; the full walk lists such contacts.
segment_id applies the conditions of the segment as they are now.
Request
- Base URLhttps://api.getsitecontrol.com
- AuthHTTP bearer
Path parameters
Query parameters
next_cursor of the previous page, sent with the same order; omit for the first
Items per page
Comma-separated fields to keep in each item, for example id,name; each item then carries only those fields and id. Omit for every field
Order of a list. oldest: the oldest item first; newest: the newest item first, for the latest items without paging through the history.
Order of the items: oldest first (default) or newest first; asc and desc mean the same
Any of these statuses; repeat for several. subscribed: subscribed, with double opt-in confirmed or not needed; unsubscribed: unsubscribed, never subscribed or awaiting double opt-in; bounced: the address bounced or failed the e-mail check
Tagged with any of these tag ids from list_tags; repeat for several
In any of these countries, ISO 3166-1 alpha-2 codes such as US; repeat for several
With any of these whole addresses, without case; repeat for several
Part of the e-mail, phone, first or last name, without case; % and _ are plain characters. Digits also match the id. To find a contact by its address, use email
created_at at or after this moment; without an offset, taken as UTC; a plain date means its start
created_at before this moment; without an offset, taken as UTC; a plain date means its start
updated_at at or after this moment; without an offset, taken as UTC; a plain date means its start. Only contacts with a recorded change match
Matching the conditions of this segment, a segment id from list_segments
Matching a tree of conditions, as JSON: the language of create_segment conditions, without saving a segment; for example contacts without a first name: {"op": "and", "args": [{"op": "undefined", "args": ["{{$contact.firstName}}"]}]}
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.