Tracking Preferences: Reading
Get Many
The preferences of up to 100 recipients in one command. Use it right before a send to decide track_opens and track_clicks per recipient.
https://g.sendcorex.com/v1/privacycommand: get_manyNeeds the privacy:read scope on your API key.
Only recipients that have a preference come back. An address missing from the answer never chose anything.
Arguments
emailsstring[]required1 to 100 recipient addresses. Duplicates and invalid addresses are ignored.
e.g.
["jane.doe@example.com", "marc.dupont@example.fr", "new.person@example.com"]
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/privacy',
{
commands: [
{
command: "get_many",
args: {
emails: [
"jane.doe@example.com",
"marc.dupont@example.fr",
"new.person@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_many",
"id": "0",
"type": "SUCCESS",
"took_ms": 6,
"data": {
"preferences": [
{
"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"
}
]
}
}
]
}Response fields
preferencesOne entry per recipient that has a preference.
preferences[].emailThe recipient address, in lowercase.
preferences[].track_openstruethe recipient allows open tracking,falsethey refused it,nullthey never chose.preferences[].track_clickstruethe recipient allows click tracking,falsethey refused it,nullthey never chose.preferences[].sourceWho made the change:
page(the recipient, on the tracking preferences page),api(you, with Set Preferences) ordashboard.preferences[].updated_atWhen the change was made. ISO 8601, UTC.
Before sending
Read the batch, then send each recipient with the tracking they allow. Recipients without a preference follow your default.
Node.js
const [r] = await call({ command: 'get_many', args: { emails: batch.map((x) => x.email) } });
const prefs = new Map(r.data.preferences.map((p) => [p.email, p]));
for (const x of batch) {
const p = prefs.get(x.email.toLowerCase());
await send({
to: x.email,
unsubscribe: true,
track_opens: p?.track_opens === true, // opt-in: only when allowed
track_clicks: p?.track_clicks === true,
});
}You do not have to do this to respect a refusal: with "unsubscribe": true, a recipient who turned tracking off is never tracked. This is for opt-in rules, where tracking must stay off until the recipient allows it.
The answer
data
{
"preferences": [
{
"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"
}
]
}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.