---
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/update-list

Contacten: lijsten

# Lijst bijwerken

Wijzig naam, beschrijving, bron of eigen data van een lijst. Alleen wat je stuurt verandert.

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

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

## Argumenten

- `list_id` string verplicht
De lijst om te wijzigen. Het id zelf kan niet veranderen.
bijv. `"customers"`
- `name` string optioneel
Nieuwe naam. `null` wist hem.
- `description` string optioneel
Nieuwe beschrijving. `null` wist hem.
- `source` string optioneel
Nieuwe bron. `null` wist hem.
- `custom` object optioneel
Samengevoegd met de huidige eigen data. Een sleutel als `null` wordt verwijderd.
bijv. `{ "year": null, "owner": "sales" }`

## Snel starten

```
import axios from 'axios';

const response = await axios.post(
  'https://g.sendcorex.com/v1/contacts',
  {
    commands: [
      {
        command: "update_list",
        args: {
          list_id: "customers",
          name: "Customers (VIP)",
          custom: {
            year: null,
            owner: "sales"
          }
        }
      }
    ]
  },
  { 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": "update_list",
      "id": "0",
      "type": "SUCCESS",
      "took_ms": 14,
      "data": {
        "list_id": "customers",
        "name": "Customers (VIP)",
        "description": "Everyone who bought at least once",
        "source": "checkout",
        "status": "ready",
        "custom": {
          "origin": "checkout",
          "owner": "sales"
        },
        "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

- `(list)`
De lijst na de wijziging, met `stats`.

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