Change field
Updates the value of field_name for the customer with customer_id. Field names may only contain lowercase Latin letters, numbers, and _.
The field must already exist. PUT does not create — use POST for that. A PUT against a field that was never created returns 404, and that 404 is an HTML page rather than the usual JSON error envelope, so do not assume the response body parses as JSON.
Path Parameters
- Type: integercustomer
_id requiredIdentifier of the customer.
- Type: stringfield
_name requiredName of the custom field. Only lowercase Latin letters, numbers, and
_are allowed.
Body·
- Type: enumtyperequired
dateis an ISO 8601 string.datetimeis a Unix timestamp.objectholds arbitrary JSON — an object or an array — and round-trips as structure rather than as an escaped string; it is the type the builder canvas presents as array/list. An unrecognised type string is not rejected: the value is silently coerced and stored asstring.valuesstringintegerfloatbooleandatedatetimeobject - valuerequired
Field value. Type must match
type.- Type: string
Field value. Type must match
type.
- Type: objectextraProperties: 1
Optional extra metadata. Pass
{}if not used.
Responses
- application/json
- application/json
- application/json
curl 'https://api.landbot.io/v1/customers/1/fields/{field_name}/' \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Token YOUR_AGENT_TOKEN' \
--data '{
"type": "datetime",
"extra": {},
"value": 1536155712.1234
}'
{
"success": true,
"field": {
"name": "payment_date",
"type": "datetime",
"extra": {},
"value": 1536155712.1234
}
}