Add List Item
Add a single element to a contact's list custom field. This is the natural fit for event-driven updates — e.g. a webhook that fires when a contact attends a meeting and appends one value.
The operation is idempotent: adding an element that is already present is a no-op. It is also atomic — concurrent adds/removes will not lose updates.
This endpoint is only valid for fields of type list.
Request
POST /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 add. Non-empty, max 255 characters. Trimmed before storing. |
Example Request
curl -X POST "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 add.
{
"data": {
"field_key": "events-attended",
"value": ["Webinar X", "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 added |
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": []
}
}
Validation Error (422 — Value too long)
Returned when the element exceeds the maximum length of 255 characters.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Value exceeds the maximum length of 255 characters",
"details": []
}
}
Validation Error (422 — List full)
Returned when adding the element would exceed the maximum of 100 elements.
{
"error": {
"code": "VALIDATION_ERROR",
"message": "List exceeds the maximum of 100 elements",
"details": []
}
}