Tracking Preferences: Reading
Get History
Every change of one recipient, newest first: what they chose, when, and who changed it. Your consent record for audits.
https://g.sendcorex.com/v1/privacycommand: get_historyNeeds the privacy:read scope on your API key.
The history is kept for as long as the preference exists. Each entry is the full state after that change.
Arguments
emailstringrequiredThe recipient address.
e.g.
"jane.doe@example.com"limitnumberoptionalHow many changes, from 1 to 500. Defaults to 50.
e.g.
50
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/privacy',
{
commands: [
{
command: "get_history",
args: {
email: "jane.doe@example.com",
limit: 50
}
}
]
},
{ 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": "get_history",
"id": "0",
"type": "SUCCESS",
"took_ms": 6,
"data": {
"history": [
{
"email": "jane.doe@example.com",
"track_opens": false,
"track_clicks": true,
"source": "page",
"updated_at": "2026-10-24T07:20:12.031Z"
},
{
"email": "jane.doe@example.com",
"track_opens": true,
"track_clicks": true,
"source": "api",
"updated_at": "2026-09-02T10:05:41.220Z"
}
]
}
}
]
}Response fields
historyThe changes, newest first. Empty when the recipient never had a preference.
history[].emailThe recipient address, in lowercase.
history[].track_openstruethe recipient allows open tracking,falsethey refused it,nullthey never chose.history[].track_clickstruethe recipient allows click tracking,falsethey refused it,nullthey never chose.history[].sourceWho made the change:
page(the recipient, on the tracking preferences page),api(you, with Set Preferences) ordashboard.history[].updated_atWhen the change was made. ISO 8601, UTC.
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
INTERNALServer error. The detail is only written to the server log.