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.

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

Needs the privacy:read scope on your API key.

i

The history is kept for as long as the preference exists. Each entry is the full state after that change.

Arguments

  • emailstringrequired

    The recipient address.

    e.g. "jane.doe@example.com"

  • limitnumberoptional

    How 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

  • history

    The changes, newest first. Empty when the recipient never had a preference.

  • history[].email

    The recipient address, in lowercase.

  • history[].track_opens

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

  • history[].track_clicks

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

  • history[].source

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

  • history[].updated_at

    When 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.

  • 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.