> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.laposta.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.laposta.org/_mcp/server.

# Lijst toevoegen

POST https://api.laposta.nl/v2/list
Content-Type: application/x-www-form-urlencoded

Maakt een nieuwe lijst aan. Alleen een naam is verplicht; de overige velden kun je later nog wijzigen. Je krijgt de volledige lijst terug, inclusief het `list_id` dat je bij alle andere aanroepen nodig hebt.Creates a new list. Only a name is required; you can change the remaining fields later. You get the full list back, including the `list_id` that you need for all other calls.Erstellt eine neue Liste. Nur ein Name ist Pflicht; die übrigen Felder kannst du später noch ändern. Du bekommst die vollständige Liste zurück, inklusive der `list_id`, die du bei allen anderen Aufrufen brauchst.Crea una lista nueva. Solo el nombre es obligatorio; los demás campos los puedes modificar más adelante. Recibes la lista completa, incluido el `list_id` que necesitas en todas las demás llamadas.

Reference: https://docs.laposta.org/lijsten/lijst-toevoegen

## Authentication

- `Authorization` header (basic auth, required) — Vul je API-sleutel in bij `api_key` en laat `leave_empty` leeg. De API gebruikt basic auth, waarbij je sleutel de plaats van de gebruikersnaam inneemt. In curl schrijf je dat als `-u JOUW_SLEUTEL:`, met een dubbele punt en niets erachter.Enter your API key at `api_key` and leave `leave_empty` empty. The API uses basic auth, with your key in place of the username. In curl that reads `-u YOUR_KEY:`, with a colon and nothing after it.Trage deinen API-Schlüssel bei `api_key` ein und lass `leave_empty` leer. Die API nutzt Basic Auth, wobei dein Schlüssel an die Stelle des Benutzernamens tritt. In curl schreibst du das als `-u DEIN_SCHLUESSEL:`, mit einem Doppelpunkt und nichts dahinter.Introduce tu clave API en `api_key` y deja `leave_empty` vacío. La API usa basic auth, con tu clave en lugar del nombre de usuario. En curl se escribe como `-u TU_CLAVE:`, con dos puntos y nada después.

## Request

### Body (application/x-www-form-urlencoded)

This endpoint expects an object.

- `name` (string, required) — Een naam voor deze lijst.Name given to the list in questionEin Name für diese Liste.Un nombre para esta lista.
- `locked` (boolean, optional) — Als een lijst is vergrendeld, kan deze niet worden gewijzigd door een gebruiker van de applicatie. (true of false)If a list is locked, it cannot be changed by a user of the application. (true or false)Wenn eine Liste gesperrt ist, kann sie von einem Benutzer der Anwendung nicht geändert werden. (true oder false)Si una lista está bloqueada, un usuario de la aplicación no la puede modificar. (true o false)
- `remarks` (string, optional) — Eventuele opmerkingen.Potential remarksEventuelle Anmerkungen.Observaciones, si las hay.
- `subscribe_notification_email` (string, optional) — E-mailadres waarnaar notificaties bij aanmeldingen kunnen worden verzonden.Email address to which a notification will be sent upon a subscriptionE-Mail-Adresse, an die Benachrichtigungen bei Anmeldungen versendet werden können.Dirección de correo electrónico a la que se pueden enviar notificaciones de nuevos registros.
- `unsubscribe_notification_email` (string, optional) — E-mailadres waarnaar notificaties bij afmeldingen kunnen worden verzonden.Email address to which a notification will be sent upon the cancelling of a subscriptionE-Mail-Adresse, an die Benachrichtigungen bei Abmeldungen versendet werden können.Dirección de correo electrónico a la que se pueden enviar notificaciones de bajas.

## Response

### 201

De aanvraag is gelukt.The request succeeded.Die Anfrage war erfolgreich.La solicitud se ha realizado correctamente.

- `list` (List, optional) — Het list-objectThe list objectDas list-ObjektEl objeto list

## Errors

### 400 Bad Request Error

De aanvraag klopt niet. Het antwoord bevat een `type`, een `message` en meestal een `code` en de `parameter` die de fout veroorzaakte. Een object dat niet bestaat valt ook hieronder, met code 203.The request is not valid. The response contains a `type`, a `message` and usually a `code` plus the `parameter` that caused it. An object that does not exist also falls under this, with code 203.Die Anfrage stimmt nicht. Die Antwort enthält einen `type`, eine `message` und meistens einen `code` und den `parameter`, der den Fehler verursacht hat. Ein Objekt, das nicht existiert, fällt ebenfalls hierunter, mit Code 203.La solicitud no es correcta. La respuesta contiene un `type`, un `message` y normalmente un `code` y el `parameter` que ha causado el error. Un objeto que no existe también entra aquí, con el código 203.

- `error` (ErrorError, optional)

### 401 Unauthorized Error

Er is geen geldige API-sleutel meegestuurd, of dit endpoint staat niet aan voor dit account.No valid API key was provided, or this endpoint is not enabled for this account.Es wurde kein gültiger API-Schlüssel mitgeschickt, oder dieser Endpunkt ist für dieses Konto nicht aktiv.No se ha enviado una clave API válida, o este endpoint no está activado para esta cuenta.

- `error` (ErrorError, optional)

### 429 Too Many Requests Error

Je hebt te veel aanvragen in een minuut gedaan. De header `Retry-After` vertelt na hoeveel seconden het weer mag.Too many requests in one minute. The `Retry-After` header tells you how many seconds to wait.Du hast zu viele Anfragen in einer Minute gestellt. Der Header `Retry-After` sagt, nach wie vielen Sekunden es wieder erlaubt ist.Has hecho demasiadas solicitudes en un minuto. La cabecera `Retry-After` indica después de cuántos segundos puedes volver a intentarlo.

- `error` (ErrorError, optional)

## Types

### List

Het list-objectThe list objectDas list-ObjektEl objeto list

- `list_id` (string, optional) — Het id van deze lijst.ID of the list in questionDie ID dieser Liste.El ID de esta lista.
- `timezone` (string, optional) — De tijdzone van het account voor datum- en tijdvelden.The account timezone used for datetime fieldsDie Zeitzone des Kontos für Datums- und Zeitfelder.La zona horaria de la cuenta para los campos de fecha y hora.
- `created` (string, optional) — Moment van aanmaken.Date and time of creationZeitpunkt der Erstellung.Momento de creación.
- `created_iso` (string, optional, nullable) — Moment van aanmaken in ISO-formaat.Date and time of creation in ISO formatZeitpunkt der Erstellung im ISO-Format.Momento de creación en formato ISO.
- `modified` (string, optional, nullable) — Moment van laatste wijziging.Date and time of last modification madeZeitpunkt der letzten Änderung.Momento de la última modificación.
- `modified_iso` (string, optional, nullable) — Moment van laatste wijziging in ISO-formaat.Date and time of last modification in ISO formatZeitpunkt der letzten Änderung im ISO-Format.Momento de la última modificación en formato ISO.
- `state` (enum, optional) — De status van de lijst: active of deleted.Status of the list: active or deletedDer Status der Liste: active oder deleted.El estado de la lista: active o deleted.
  - Allowed values: `active`, `deleted`
- `name` (string, optional) — Naam die aan deze lijst gegeven is.Name given to the list in questionName, der dieser Liste gegeben wurde.Nombre que se ha dado a esta lista.
- `locked` (boolean, optional) — Of de lijst vergrendeld is. Een vergrendelde lijst kan een gebruiker niet in de applicatie wijzigen.If a list is locked, it cannot be changed by a user of the application. (true or false)Ob die Liste gesperrt ist. Eine gesperrte Liste kann ein Benutzer in der Anwendung nicht ändern.Si la lista está bloqueada. Un usuario no puede modificar una lista bloqueada en la aplicación.
- `remarks` (string, optional) — Je eigen aantekening bij deze lijst.Potential remarksDeine eigene Notiz zu dieser Liste.Tu propia anotación sobre esta lista.
- `subscribe_notification_email` (string, optional) — E-mailadres waarnaar een notificatie wordt verstuurd bij een aanmelding.Email address to which a notification will be sent upon a subscriptionE-Mail-Adresse, an die bei einer Anmeldung eine Benachrichtigung versendet wird.Dirección de correo electrónico a la que se envía una notificación cuando se produce un registro.
- `unsubscribe_notification_email` (string, optional) — E-mailadres waarnaar een notificatie wordt verstuurd bij een afmelding.Email address to which a notification will be sent upon the cancelling of a subscriptionE-Mail-Adresse, an die bei einer Abmeldung eine Benachrichtigung versendet wird.Dirección de correo electrónico a la que se envía una notificación cuando se produce una baja.
- `members` (ListMembers, optional) — Het aantal actieve, afgemelde en opgeschoonde relaties in deze lijst.Information in regards to the number of active, unsubscribed and cleaned (deleted) membersDie Anzahl aktiver, abgemeldeter und bereinigter Abonnenten in dieser Liste.El número de contactos activos, dados de baja y depurados de esta lista.
- `account_id` (string, optional) — Het id van het account waar deze lijst bij hoort.The id of the account this list belongs to.Die ID des Kontos, zu dem diese Liste gehört.El ID de la cuenta a la que pertenece esta lista.

### ErrorError

- `type` (enum, required)
  - Allowed values: `invalid_request`, `invalid_input`, `internal`
- `message` (string, required)
- `code` (integer, optional)
- `parameter` (string, optional)

### ListMembers

Het aantal actieve, afgemelde en opgeschoonde relaties in deze lijst.Information in regards to the number of active, unsubscribed and cleaned (deleted) membersDie Anzahl aktiver, abgemeldeter und bereinigter Abonnenten in dieser Liste.El número de contactos activos, dados de baja y depurados de esta lista.

## Examples

**Request**

```json
{
  "name": "Nieuwsbrief"
}
```

**Response**

```json
{
  "list": {
    "list_id": "BaImMu3JZA",
    "timezone": "Europe/Amsterdam",
    "created": "string",
    "created_iso": "string",
    "modified": "string",
    "modified_iso": "string",
    "state": "active",
    "name": "Nieuwsbrief",
    "locked": true,
    "remarks": "string",
    "subscribe_notification_email": "string",
    "unsubscribe_notification_email": "string",
    "members": {},
    "account_id": "wFiUS4HL4e"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.laposta.nl/v2/list"

payload = ""
headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

response = requests.post(url, data=payload, headers=headers, auth=("<api_key>", "<leave_empty>"))

print(response.json())
```

```javascript
const url = 'https://api.laposta.nl/v2/list';
const credentials = btoa("<api_key>:<leave_empty>");

const options = {
  method: 'POST',
  headers: {
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.laposta.nl/v2/list"

	req, _ := http.NewRequest("POST", url, nil)

	req.SetBasicAuth("<api_key>", "<leave_empty>")
	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.laposta.nl/v2/list")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request.basic_auth("<api_key>", "<leave_empty>")
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.laposta.nl/v2/list")
  .basicAuth("<api_key>", "<leave_empty>")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.laposta.nl/v2/list', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
    'auth' => ['<api_key>', '<leave_empty>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.laposta.nl/v2/list");
client.Authenticator = new HttpBasicAuthenticator("<api_key>", "<leave_empty>");
var request = new RestRequest(Method.POST);

request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<api_key>:<leave_empty>".utf8).base64EncodedString()

let headers = [
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/x-www-form-urlencoded"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.laposta.nl/v2/list")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```