Tracking Preferences: Reading
Get Preferences
The open and click tracking choice of one recipient. One lookup by address, no scan.
https://g.sendcorex.com/v1/privacycommand: get_preferencesNeeds the privacy:read scope on your API key.
preference is null when the recipient never opened the tracking preferences page and you never set anything for them.
Arguments
emailstringrequiredThe recipient address. Case does not matter.
e.g.
"jane.doe@example.com"
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/privacy',
{
commands: [
{
command: "get_preferences",
args: {
email: "jane.doe@example.com"
}
}
]
},
{ 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_preferences",
"id": "0",
"type": "SUCCESS",
"took_ms": 6,
"data": {
"preference": {
"email": "jane.doe@example.com",
"track_opens": false,
"track_clicks": true,
"source": "page",
"updated_at": "2026-10-24T07:20:12.031Z"
}
}
}
]
}Response fields
preferenceThe preference below, or
nullwhen there is none.preference.emailThe recipient address, in lowercase.
preference.track_openstruethe recipient allows open tracking,falsethey refused it,nullthey never chose.preference.track_clickstruethe recipient allows click tracking,falsethey refused it,nullthey never chose.preference.sourceWho made the change:
page(the recipient, on the tracking preferences page),api(you, with Set Preferences) ordashboard.preference.updated_atWhen the change was made. ISO 8601, UTC.
How it affects your sends
Refusal always winsWhen
track_opensortrack_clicksisfalse, that tracking is left out of the email even if your send asks for it with"track_opens": true.Never choseWhen the value is
null(or the recipient has no preference at all), your send decides, exactly as before.Needs our unsubscribe enginePreferences are applied to sends with
"unsubscribe": true. That is also what puts the preferences link in the email.Your defaultFor opt-in rules (for example France), send
"track_opens": falseand"track_clicks": falseuntil the recipient allowed it, and read the preference with Get Many before sending.
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.