E-mails ontvangen: contacten en doelgroep

List Contacts

Toont de mensen die met deze mailbox mailen, met dezelfde filters als het dashboard. Alleen-lezen.

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

Argumenten

  • whereobjectoptioneel

    Filters: status, tags, domein, opens en klikken, datums en eigen velden. Zelfde formaat als de contacten in het dashboard.

  • sortobjectoptioneel

    { field }: email, created_at, last_open_at, last_click_at, open_count of click_count.

  • 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: "list_contacts",
        args: {
          where: {
            last_open_at: {
              within_days: 30
            }
          },
          limit: 50
        }
      }
    ]
  },
  { 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": "list_contacts",
      "id": "0",
      "type": "SUCCESS",
      "data": {
        "contacts": [
          {
            "email": "ana@empresa.com",
            "first_name": "Ana",
            "last_name": "Lima",
            "status": "subscribed",
            "tags": [
              "hot"
            ],
            "counts": {
              "sent": 4,
              "opens": 3,
              "clicks": 1
            },
            "dates": {
              "last_open_at": "2026-11-21T09:42:00Z",
              "last_click_at": "2026-11-21T09:43:00Z"
            },
            "trust": "default",
            "company": "Empresa",
            "lists": [],
            "fields": {}
          }
        ],
        "has_more": false,
        "next_cursor": null
      }
    }
  ]
}

Responsevelden

  • contacts[]

    E-mail, naam, bedrijf, status, tags, lijsten, velden, tellingen, datums en vertrouwen in deze mailbox.

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

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