Remove List Item
Remove a single element from a contact's list custom field. The operation is atomic and idempotent: removing an element that is not present (or operating on a contact that has no value yet) is a no-op and returns the current list.
This endpoint is only valid for fields of type list. To clear the whole field, use Delete Contact Custom Field instead.
Request
DELETE /contacts/{contactUuid}/custom-fields/{fieldUuid}/items
Path Parameters
| Parameter | Type | Description |
|---|---|---|
contactUuid | string | Contact's UUID |
fieldUuid | string | Custom field's UUID (must be a list field) |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
value | string | Yes | The single element to remove. Non-empty, max 255 characters. |
Example Request
curl -X DELETE "https://email.easy.tools/api/v1/contacts/b8e4d6a1-3c52-4f7e-9a08-6d1b2c3e4f5a/custom-fields/3b4c5d6e-7f80-4912-a3b4-c5d6e7f8a90b/items" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"value": "Webinar X"
}'
Response
Success Response (200 OK)
Returns the full resulting list after the removal.
{
"data": {
"field_key": "events-attended",
"value": ["Webinar Y"]
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
field_key | string | The field's unique key |
value | array of strings | The full list after the element was removed |
Error Responses
Not Found Error (404) - Contact
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Contact not found"
}
}
Not Found Error (404) - Field
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Custom field not found"
}
}
Validation Error (422 — Not a list field)
Returned when the target field is not of type list.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Item operations are only supported for list type fields",
"details": []
}
}
Validation Error (422 — Invalid value)
Returned when value is present but empty, or is not a string or number. A
missing value key instead returns "The given data was invalid" with a
details object.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid value for list item",
"details": []
}
}