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

# Veld wijzigen

POST https://api.laposta.nl/v2/field/{field_id}
Content-Type: application/x-www-form-urlencoded

Wijzigt een veld. Je stuurt alleen mee wat anders moet worden. De keuzemogelijkheden van een keuzeveld vervang je in hun geheel via `options_full`.You will only have to include the parts that need to be modified. Parts that are not mentioned will keep their current values. As soon as a part is mentioned it does get checked, and thus can cause an error message. This error message contains a code with a message. See above under 'Error messages' what these codes stand for. Pass options_full as a complete replacement for the option list. The key of each entry determines the operation: You may also pass options_full as an array of  objects — the same shape as the response. The API will handle both formats.Ändert ein Feld. Du schickst nur mit, was anders werden soll. Die Auswahlmöglichkeiten eines Auswahlfeldes ersetzt du komplett über `options_full`.Modifica un campo. Solo envías lo que debe cambiar. Las opciones de un campo de selección se sustituyen en su totalidad mediante `options_full`.

Reference: https://docs.laposta.org/velden/veld-wijzigen

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

- `field_id` (string, required)

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

This endpoint expects an object.

- `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.
- `required` (boolean, required) — Is dit een verplicht veld?Is this a mandatory field?Ist dies ein Pflichtfeld?¿Es este un campo obligatorio?
- `name` (string, optional) — Een naam voor dit veld.A name for this fieldEin Name für dieses Feld.Un nombre para este campo.
- `datatype` (enum, optional) — Het datatype van dit veld (text, numeric, date, select_single, select_multiple)The data type of this field (text, numeric, date, select_single, select_multiple)Der Datentyp dieses Feldes (text, numeric, date, select_single, select_multiple)El tipo de dato de este campo (text, numeric, date, select_single, select_multiple)
  - Allowed values: `text`, `numeric`, `date`, `select_single`, `select_multiple`
- `datatype_display` (enum, optional) — Alleen voor select_single: de gewenste weergave (select, radio)Only applicable for select_single: the desired display (select, radio)Nur für select_single: die gewünschte Darstellung (select, radio)Solo para select_single: la visualización deseada (select, radio)
  - Allowed values: `select`, `radio`
- `options_full` (list of string, optional) — \<span class="lp-taal lp-nl">De volledige lijst met opties van een select\_single of select\_multiple veld, als een key/value map van id → label. De key bepaalt wat er met elke optie gebeurt: Bestaand numeriek id (bijv. "2"), behoudt of wijzigt de optie. Als het label verandert wordt het bijgewerkt; het id blijft hetzelfde, zodat bestaande ledendata behouden blijft. Niet-numerieke key (bijv. "new-0"), voegt een nieuwe optie toe; een nieuw id wordt automatisch toegekend. Een bestaand id weglaten, verwijdert die optie. Stuur altijd alle opties mee die je wilt behouden. Verstuur als JSON. Alternatief formaat: in plaats van een key/value map mag je ook een array van objecten meegeven in dezelfde vorm als de response: \[\{"id": "1", "value": "Rood"}, \{"id": "new-0", "value": "Oranje"}]. De API normaliseert dit automatisch.\</span>\<span class="lp-taal lp-en">The full set of options for a select\_single or select\_multiple field, as a key/value map of id → label. The key controls what happens to each option: Existing numeric ID (e.g. "2") — keeps or modifies the option. Changing the label updates it in-place; the ID stays the same, so existing member data is preserved. Non-numeric key (e.g. "new-0") — adds a new option; a fresh ID is assigned automatically. Omitting an existing ID — deletes that option. Always include every option you want to keep. Must be sent as JSON. Alternative format: instead of a key/value map you may also pass an array of objects in the same shape as the response: \[\{"id": "1", "value": "Red"}, \{"id": "new-0", "value": "Orange"}]. The API will normalise this automatically.\</span>\<span class="lp-taal lp-de">Die vollständige Liste der Optionen eines select\_single- oder select\_multiple-Feldes, als key/value-Map von id → label. Der key bestimmt, was mit jeder Option passiert: Bestehende numerische ID (z. B. "2"), behält oder ändert die Option. Ändert sich das Label, wird es aktualisiert; die ID bleibt gleich, sodass bestehende Abonnentendaten erhalten bleiben. Nicht-numerischer key (z. B. "new-0"), fügt eine neue Option hinzu; eine neue ID wird automatisch vergeben. Eine bestehende ID weglassen, löscht diese Option. Schicke immer alle Optionen mit, die du behalten willst. Als JSON versenden. Alternatives Format: statt einer key/value-Map darfst du auch ein Array von Objekten in derselben Form wie die Response mitgeben: \[\{"id": "1", "value": "Rot"}, \{"id": "new-0", "value": "Orange"}]. Die API normalisiert das automatisch.\</span>\<span class="lp-taal lp-es">La lista completa de opciones de un campo select\_single o select\_multiple, como un mapa key/value de id → label. La key determina lo que ocurre con cada opción: un id numérico existente (por ejemplo "2"), mantiene o modifica la opción. Si el label cambia, se actualiza; el id sigue siendo el mismo, de modo que se conservan los datos existentes de los contactos. Una key no numérica (por ejemplo "new-0"), añade una opción nueva; se asigna automáticamente un id nuevo. Omitir un id existente, elimina esa opción. Envía siempre todas las opciones que quieras conservar. Envíalo como JSON. Formato alternativo: en lugar de un mapa key/value también puedes enviar un array de objetos con la misma forma que la respuesta: \[\{"id": "1", "value": "Rojo"}, \{"id": "new-0", "value": "Naranja"}]. La API lo normaliza automáticamente.\</span>
- `defaultvalue` (string, optional) — Standaardwaarde (wordt gebruikt bij afwezigheid van dit veld)The default value (will be used in the absence of this field)Standardwert (wird verwendet, wenn dieses Feld fehlt)Valor predeterminado (se usa cuando este campo no se envía)
- `in_form` (boolean, optional) — Is het veld te zien in het aanmeldformulier? (boolean)Does this field occur in the subscription form? (boolean)Ist das Feld im Anmeldeformular zu sehen? (boolean)¿El campo se ve en el formulario de registro? (boolean)
- `in_list` (boolean, optional) — Is het veld te zien in het overzicht in Laposta? (boolean)Is this field visible in Laposta's overview? (boolean)Ist das Feld in der Übersicht in Laposta zu sehen? (boolean)¿El campo se ve en la vista general de Laposta? (boolean)

## Response

### 200

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

- `field` (Field, optional) — Het field-objectThe field objectDas field-ObjektEl objeto field

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

### Field

Het field-objectThe field objectDas field-ObjektEl objeto field

- `field_id` (string, optional) — Het id van dit veld.The ID of the field in questionDie ID dieses Feldes.El ID de este campo.
- `list_id` (string, optional) — Het id van de lijst waartoe het veld behoort.The ID of the list to which the field belongsDie ID der Liste, zu der das Feld gehört.El ID de la lista a la que pertenece el campo.
- `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) — Altijd leeg. Laposta bewaart geen wijzigingsmomenten van velden.Always null. Field modification times are not stored and this field is kept for backwards compatibility.Immer leer. Laposta speichert keine Änderungszeitpunkte von Feldern.Siempre vacío. Laposta no guarda los momentos de modificación de los campos.
- `state` (enum, optional) — De status van dit veld: active of deleted.The status of the field in question: either active or deletedDer Status dieses Feldes: active oder deleted.El estado de este campo: active o deleted.
  - Allowed values: `active`, `deleted`
- `name` (string, optional) — Naam van het veld (voor weergave)Name of the field (for displaying purposes)Name des Feldes (für die Anzeige)Nombre del campo (para la visualización)
- `tag` (string, optional) — De relatievariabele waarmee je dit veld in een campagne gebruikt. Deze is niet te wijzigen.The subscriber variable for usage in campaigns (not modifyable)Die Abonnentenvariable, mit der du dieses Feld in einer Kampagne verwendest. Sie lässt sich nicht ändern.La variable de contacto con la que usas este campo en una campaña. No se puede modificar.
- `custom_name` (string, optional) — De sleutel waarmee je dit veld bij relaties meegeeft in `custom_fields`.Name of the field (for use in member API calls)Der Schlüssel, mit dem du dieses Feld bei Abonnenten in `custom_fields` mitgibst.La clave con la que envías este campo en `custom_fields` para los contactos.
- `defaultvalue` (string, optional) — De waarde die geldt als je dit veld niet meestuurt.The default value (will be used in the absence of this field)Der Wert, der gilt, wenn du dieses Feld nicht mitschickst.El valor que se aplica si no envías este campo.
- `datatype` (enum, optional) — Het datatype van dit veld (text, numeric, date, select_single, select_multiple of labels). Het type labels hoort bij het veld Labels, dat vanzelf ontstaat zodra je lijst minstens een label heeft; dat veld maak je niet zelf aan.The data type of the field in question (text, numeric, date, select_single, select_multiple or labels). The labels type belongs to the Labels field, which comes into being by itself as soon as your list has at least one label; you do not create that field yourself.Der Datentyp dieses Feldes (text, numeric, date, select_single, select_multiple oder labels). Der Typ labels gehört zum Feld Labels, das von selbst entsteht, sobald die Liste mindestens ein Label hat; dieses Feld legt man nicht selbst an.El tipo de dato de este campo (text, numeric, date, select_single, select_multiple o labels). El tipo labels corresponde al campo Etiquetas, que aparece por sí solo en cuanto tu lista tiene al menos una etiqueta; ese campo no lo creas tú.
  - Allowed values: `text`, `numeric`, `date`, `select_single`, `select_multiple`, `labels`
- `datatype_display` (enum, optional) — Alleen voor select_single: de gewenste weergave (select, radio)Only applicable for select_single: the desired display (select, radio)Nur für select_single: die gewünschte Darstellung (select, radio)Solo para select_single: la visualización deseada (select, radio)
  - Allowed values: `select`, `radio`
- `options` (list of string, optional) — Een array van de beschikbare opties (bij select_single, select_multiple of labels). Bij een labels-veld staan hier de labels van deze lijst.An array of the available options (for select_single, select_multiple or labels). For a labels field, these are the labels of this list.Ein Array der verfügbaren Optionen (bei select_single, select_multiple oder labels). Bei einem labels-Feld stehen hier die Labels dieser Liste.Un array de las opciones disponibles (con select_single, select_multiple o labels). En un campo labels aquí están las etiquetas de esta lista.
- `options_full` (list of string, optional) — Een array van de beschikbare opties, inclusief id's (bij select_single, select_multiple of labels).An array of the available options, including IDs (for select_single, select_multiple or labels).Ein Array der verfügbaren Optionen, inklusive IDs (bei select_single, select_multiple oder labels).Un array de las opciones disponibles, incluidos los ID (con select_single, select_multiple o labels).
- `required` (boolean, optional) — Is dit een verplicht veld? (true of false)Is this a mandatory field? (true or false)Ist dies ein Pflichtfeld? (true oder false)¿Es este un campo obligatorio? (true o false)
- `in_form` (boolean, optional) — Komt dit veld voor in het aanmeldformulier? (true of false)Does this field occur in the subscription form? (true or false)Kommt dieses Feld im Anmeldeformular vor? (true oder false)¿Este campo aparece en el formulario de registro? (true o false)
- `in_list` (boolean, optional) — Komt dit veld voor bij het bladeren in de lijst? (true of false)Does this field occur while browsing the list? (true or false)Kommt dieses Feld beim Blättern in der Liste vor? (true oder false)¿Este campo aparece al navegar por la lista? (true o false)
- `autocomplete` (string, optional) — De waarde voor het autocomplete-attribuut in het aanmeldformulier.The value for the html autocomplete attribute (string)Der Wert für das autocomplete-Attribut im Anmeldeformular.El valor del atributo autocomplete en el formulario de registro.
- `pos` (string, optional) — De positie van dit veld in de lijst, als tekst met een getal erin.The position of this field in the list, as a string containing a number.Die Position dieses Feldes in der Liste, als Text mit einer Zahl darin.La posición de este campo en la lista, como texto con un número.
- `is_email` (boolean, optional) — Of dit het e-mailadresveld van de lijst is.Whether this is the email field of the list.Ob dies das E-Mail-Adressfeld der Liste ist.Si este es el campo de dirección de correo electrónico de la lista.

### ErrorError

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

## Examples

**Request**

```json
{
  "list_id": "BaImMu3JZA",
  "required": "false"
}
```

**Response**

```json
{
  "field": {
    "field_id": "Z87ysHha9A",
    "list_id": "BaImMu3JZA",
    "timezone": "Europe/Amsterdam",
    "created": "string",
    "created_iso": "string",
    "modified": "string",
    "state": "active",
    "name": "Nieuwsbrief",
    "tag": "string",
    "custom_name": "string",
    "defaultvalue": "string",
    "datatype": "text",
    "datatype_display": "select",
    "options": [
      "string"
    ],
    "options_full": [
      "string"
    ],
    "required": true,
    "in_form": true,
    "in_list": true,
    "autocomplete": "string",
    "pos": "string",
    "is_email": true
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.laposta.nl/v2/field/field_id"

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/field/field_id';
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/field/field_id"

	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/field/field_id")

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/field/field_id")
  .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/field/field_id', [
  '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/field/field_id");
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/field/field_id")! 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()
```