Tracking Preferences: Reading
List Changes
Every preference change of your account, oldest first, with a cursor. Keep your CRM in sync without missing one.
https://g.sendcorex.com/v1/privacycommand: list_changesNeeds the privacy:read scope on your API key.
Keep next_cursor and send it on the next call. It always comes back, even when nothing changed.
Changes show up about 5 seconds after they happen, and the feed keeps the last 90 days.
Arguments
cursorstringoptionalThe
next_cursorof the previous call. Without it you start at the beginning of the 90 days.e.g.
"ZjowMDAwMDAwMDgzOjE3NjEyOTA0MTIwMzE6amFuZS5kb2VAZXhhbXBsZS5jb20"limitnumberoptionalChanges per call, from 1 to 1000. Defaults to 100.
e.g.
100
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/privacy',
{
commands: [
{
command: "list_changes",
args: {
cursor: "ZjowMDAwMDAwMDgzOjE3NjEyOTA0MTIwMzE6amFuZS5kb2VAZXhhbXBsZS5jb20",
limit: 100
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "list_changes",
"id": "0",
"type": "SUCCESS",
"took_ms": 6,
"data": {
"changes": [
{
"email": "jane.doe@example.com",
"track_opens": false,
"track_clicks": true,
"source": "page",
"updated_at": "2026-10-24T07:20:12.031Z"
},
{
"email": "marc.dupont@example.fr",
"track_opens": false,
"track_clicks": false,
"source": "api",
"updated_at": "2026-10-24T07:41:55.508Z"
}
],
"next_cursor": "ZjowMDAwMDAwMDgzOjE3NjEyOTA0MTIwMzE6amFuZS5kb2VAZXhhbXBsZS5jb20",
"has_more": false
}
}
]
}Response fields
changesThe changes of this call, oldest first. Each one is the full state of the recipient after the change.
next_cursorSend it as
cursoron the next call.has_moretruewhen more changes are already waiting: call again right away.changes[].emailThe recipient address, in lowercase.
changes[].track_openstruethe recipient allows open tracking,falsethey refused it,nullthey never chose.changes[].track_clickstruethe recipient allows click tracking,falsethey refused it,nullthey never chose.changes[].sourceWho made the change:
page(the recipient, on the tracking preferences page),api(you, with Set Preferences) ordashboard.changes[].updated_atWhen the change was made. ISO 8601, UTC.
Sync with your CRM
Store the cursor somewhere that survives a restart. On every tick, read until has_more is false and write each change to the contact in your CRM (Salesforce, HubSpot…).
Node.js
let cursor = await loadCursor(); // null the first time
async function sync() {
let more = true;
while (more) {
const [r] = await call({ command: 'list_changes', args: cursor ? { cursor, limit: 500 } : { limit: 500 } });
for (const c of r.data.changes) {
if (c.source === 'api') continue; // you made this change yourself
await crm.updateContact(c.email, { trackOpens: c.track_opens, trackClicks: c.track_clicks, consentAt: c.updated_at });
}
cursor = r.data.next_cursor;
await saveCursor(cursor);
more = r.data.has_more;
}
}
setInterval(sync, 60_000);Prefer push? The tracking_preferences_updated webhook sends each change made on the page the moment it happens. Use this command as the safety net.
Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have the scope of this command (`privacy:read` to read, `privacy:write` to change).
- CMD
INVALID_ARGSAn argument is invalid: missing or malformed `email`, more than 100 `emails`, `track_opens` that is not `true`/`false`, limit out of range…
- CMD
INVALID_CURSORThe cursor is malformed or came from a different account. Start again without a cursor.
- CMD
INTERNALServer error. The detail is only written to the server log.