Skip to main content

Add Contact to List

Add a contact to a list.

Request

POST /lists/{listUuid}/contacts

Path Parameters

ParameterTypeDescription
listUuidstringList's UUID

Request Body

ParameterTypeRequiredDescription
contact_uuidstringYesUUID of the contact to add
note

If the contact was previously unsubscribed from this list, the request is silently ignored - a 204 No Content response is returned but the contact is not re-added to the list.

Example Request

curl -X POST "https://email.easy.tools/api/v1/lists/list-uuid-123/contacts" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"contact_uuid": "550e8400-e29b-41d4-a716-446655440000"
}'

Response

Success Response (204 No Content)

No response body.

Error Responses

Not Found Error (404) - List

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "List with uuid 'list-uuid-123' not found"
}
}

Not Found Error (404) - Contact

{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Contact with uuid 'contact-uuid-123' not found"
}
}

Duplicate Error (409 Conflict)

Returned when the contact is already in the list.

{
"error": {
"code": "DUPLICATE_RESOURCE",
"message": "Contact 'contact-uuid-123' is already in list 'list-uuid-123'"
}
}

Validation Error (422 Unprocessable Entity)

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"contact_uuid": ["The contact uuid field is required."]
}
}
}