---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://docs.sendcorex.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://docs.sendcorex.com/llms.txt"
---

Source: https://docs.sendcorex.com/nl/api-reference/contacts/lists/get-list

Contacten: lijsten

# Lijst ophalen

Eén lijst met attributen en live tellers: leden, mailbare leden, en leden die openden of klikten.

POST `https://g.sendcorex.com/v1/contacts` command: get_list

Vereist de scope `contact:read` op je API key.

## Argumenten

- `list_id` string verplicht
Het lijst-id.
bijv. `"customers"`

## Snel starten

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/contacts',
  {
    commands: [
      {
        command: "get_list",
        args: {
          list_id: "customers"
        }
      }
    ]
  },
  { 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_list",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 14,
      "data": {
        "list_id": "customers",
        "name": "Customers",
        "description": "Everyone who bought at least once",
        "source": "checkout",
        "status": "ready",
        "custom": {
          "origin": "checkout",
          "year": 2026
        },
        "created_at": "2026-10-01T10:00:00.000Z",
        "updated_at": "2026-10-12T15:22:41.000Z",
        "stats": {
          "total": 1834,
          "ok": 1790,
          "opened": 912,
          "clicked": 233
        }
      }
    }
  ]
}
```

### Responsevelden

- `stats.total`
Contacten in de lijst.
- `stats.ok`
Mailbare contacten: aangemeld op de lijst en met status `subscribed`.
- `stats.opened / clicked`
Leden die minstens één keer openden of klikten.

## Tellers zijn live

De tellers worden bij elke wijziging van een lid bijgewerkt, dus uitlezen loopt niet door de lijst. Een lijst die wordt verwijderd, antwoordt `NOT_FOUND`.

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

- 401`INVALID_API_KEY`
De API key bestaat niet, is ingetrokken of is uitgeschakeld in het dashboard.
- 429`RATE_LIMITED`
Meer dan 15 requests/s of 15 tegelijk voor hetzelfde IP + API key. Wacht het aantal seconden uit Retry-After.
- CMD`MISSING_SCOPE`
De API key heeft niet de scope die deze opdracht nodig heeft. De andere opdrachten in het request draaien gewoon.
- CMD`INVALID_ARGS`
Een verplicht argument ontbreekt of is ongeldig: e-mailadres, veldwaarde, enum-optie, where-sleutel, lijst-id…
- CMD`NOT_FOUND`
Het contact, de lijst, het veld of het segment bestaat niet.
- CMD`INTERNAL`
Serverfout. Het detail wordt alleen in het serverlog geschreven.
