> 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 verwijderen

DELETE https://api.laposta.nl/v2/list/{list_id}

Verwijdert de lijst definitief, met alle relaties, velden en segmenten erin. Je krijgt de lijst nog eenmaal terug, nu met `state` op `deleted`. Daarna is hij niet meer op te vragen.This permanently deletes a list. If the list does not exist, an error message is displayed. In response you are shown another list object, but now with the state 'deleted'. After having finished this procedure, it is no longer possible for the user to request the list.Löscht die Liste endgültig, mit allen Abonnenten, Feldern und Segmenten darin. Du bekommst die Liste noch einmal zurück, jetzt mit `state` auf `deleted`. Danach ist sie nicht mehr abrufbar.Elimina la lista de forma definitiva, con todos los contactos, campos y segmentos que contiene. Recibes la lista una última vez, ahora con `state` en `deleted`. Después ya no se puede consultar.

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

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

### Path parameters

- `list_id` (string, required) — Het id van de lijst. Dat vind je in het antwoord van [Alle lijsten opvragen](/lijsten/alle-lijsten-opvragen), en in de applicatie in de URL van de lijst.The id of the list. You find it in the response of [Get all lists](/lijsten/alle-lijsten-opvragen), and in the application in the URL of the list.Die ID der Liste. Du findest sie in der Antwort von [Alle Listen abrufen](/lijsten/alle-lijsten-opvragen) und in der Anwendung in der URL der Liste.El id de la lista. Lo encuentras en la respuesta de [Obtener todas las listas](/lijsten/alle-lijsten-opvragen) y en la aplicación, en la URL de la lista.

## Response

### 200

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

**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/BaImMu3JZA"

response = requests.delete(url, auth=("<api_key>", "<leave_empty>"))

print(response.json())
```

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

const options = {method: 'DELETE', headers: {Authorization: `Basic ${credentials}`}};

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/BaImMu3JZA"

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

	req.SetBasicAuth("<api_key>", "<leave_empty>")

	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/BaImMu3JZA")

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

request = Net::HTTP::Delete.new(url)
request.basic_auth("<api_key>", "<leave_empty>")

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.delete("https://api.laposta.nl/v2/list/BaImMu3JZA")
  .basicAuth("<api_key>", "<leave_empty>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.laposta.nl/v2/list/BaImMu3JZA', [
  'headers' => [
  ],
    'auth' => ['<api_key>', '<leave_empty>'],
]);

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

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

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

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.laposta.nl/v2/list/BaImMu3JZA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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()
```