Add Contact to List
Add a contact to a list.
Request
POST /lists/{listUuid}/contacts
Path Parameters
| Parameter | Type | Description |
|---|---|---|
listUuid | string | List's UUID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
contact_uuid | string | Yes | UUID of the contact to add |
This endpoint is idempotent and always returns 204 No Content on success:
- If the contact is not in the list, it is added.
- If the contact is already in the list, the request is silently ignored (no duplicate is created).
- If the contact previously unsubscribed from this list, the request is silently ignored and the contact is not re-added.
Example Request
curl -X POST "https://email.easy.tools/api/v1/lists/70dbd819-fac2-4dcf-b655-fb925e24410b/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 '70dbd819-fac2-4dcf-b655-fb925e24410b' not found"
}
}
Not Found Error (404) - Contact
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Contact with uuid 'b8e4d6a1-3c52-4f7e-9a08-6d1b2c3e4f5a' not found"
}
}
Validation Error (422 Unprocessable Entity)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"contact_uuid": ["The contact uuid field is required."]
}
}
}