E-mails ontvangen: contacten en doelgroep

Get Contact Events

Historie van een contact: opens, klikken met de link, en ontvangen e-mails. Alleen-lezen.

POSThttps://g.sendcorex.com/v1command: get_contact_events

Argumenten

  • emailstringverplicht

    Het e-mailadres van het contact.

  • limitnumberoptioneel

    Paginagrootte, van 1 tot 100.

  • cursorstringoptioneel

    De next_cursor van de vorige pagina.

Snel starten

import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1',
  {
    commands: [
      {
        command: "get_contact_events",
        args: {
          email: "ana@empresa.com",
          limit: 30
        }
      }
    ]
  },
  { headers: { Authorization: process.env.SENDCOREX_TOKEN } },
);

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_contact_events",
      "id": "0",
      "type": "SUCCESS",
      "data": {
        "events": [
          {
            "kind": "click",
            "at": "2026-11-21T09:43:00Z",
            "url": "https://acme.com/pricing",
            "subject": "Your proposal"
          },
          {
            "kind": "open",
            "at": "2026-11-21T09:42:00Z",
            "subject": "Your proposal"
          }
        ],
        "has_more": false,
        "next_cursor": null
      }
    }
  ]
}

Responsevelden

  • events[]

    kind (open, click, sent), at en, als die er is, subject en url.

  • has_more / next_cursor

    Paginering.

Fouten

Fouten op HTTP-niveau geven type, code en message terug. Fouten met CMD komen terug in het resultaat van de opdracht, met HTTP 200.

  • 401TOKEN_EXPIRED

    De access token is verlopen. Roep Refresh Token aan en herhaal het request.

  • 401INVALID_TOKEN

    De token is ongeldig, onbekend of ingetrokken.

  • 429RATE_LIMITED

    Meer dan 15 requests/s of 15 tegelijk voor hetzelfde IP + mailbox. Wacht het aantal seconden uit Retry-After.

  • CMDINVALID_ARGS

    Een verplicht argument ontbreekt of is ongeldig.

  • CMDNOT_FOUND

    Het bericht, de thread of de map bestaat niet voor deze token.

  • CMDINVALID_CURSOR

    De cursor is ongeldig of hoort bij een ander account of een andere map.

  • CMDINTERNAL

    Serverfout. Het detail wordt alleen in het serverlog geschreven.