Tracking Preferences: Reading

Get Preferences

The open and click tracking choice of one recipient. One lookup by address, no scan.

POSThttps://g.sendcorex.com/v1/privacycommand: get_preferences
i

Needs the privacy:read scope on your API key.

i

preference is null when the recipient never opened the tracking preferences page and you never set anything for them.

Arguments

  • emailstringrequired

    The 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

  • preference

    The preference below, or null when there is none.

  • preference.email

    The recipient address, in lowercase.

  • preference.track_opens

    true the recipient allows open tracking, false they refused it, null they never chose.

  • preference.track_clicks

    true the recipient allows click tracking, false they refused it, null they never chose.

  • preference.source

    Who made the change: page (the recipient, on the tracking preferences page), api (you, with Set Preferences) or dashboard.

  • preference.updated_at

    When the change was made. ISO 8601, UTC.

How it affects your sends

  • Refusal always wins

    When track_opens or track_clicks is false, that tracking is left out of the email even if your send asks for it with "track_opens": true.

  • Never chose

    When the value is null (or the recipient has no preference at all), your send decides, exactly as before.

  • Needs our unsubscribe engine

    Preferences are applied to sends with "unsubscribe": true. That is also what puts the preferences link in the email.

  • Your default

    For opt-in rules (for example France), send "track_opens": false and "track_clicks": false until 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.

  • 401INVALID_API_KEY

    The API key does not exist, was revoked or was disabled in the dashboard.

  • 429RATE_LIMITED

    More than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.

  • CMDMISSING_SCOPE

    The API key does not have the scope of this command (`privacy:read` to read, `privacy:write` to change).

  • CMDINVALID_ARGS

    An argument is invalid: missing or malformed `email`, more than 100 `emails`, `track_opens` that is not `true`/`false`, limit out of range…

  • CMDINTERNAL

    Server error. The detail is only written to the server log.