Skip to main content

Create List

Create a new contact list in your easymail account.

Request

POST /lists

Request Body

ParameterTypeRequiredDescription
namestringYesList name (max 255 characters)
descriptionstringNoPublic description of the list (max 1000 characters)
is_publicbooleanNoWhether the list is public (default: true)

Example Request

curl -X POST "https://email.easy.tools/api/v1/lists" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Newsletter Subscribers",
"description": "Main newsletter list",
"is_public": true
}'

Response

Success Response (201 Created)

{
"data": {
"uuid": "list-uuid-123",
"name": "Newsletter Subscribers",
"description": "Main newsletter list",
"is_public": true,
"contacts_count": 0,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}
}

Response Fields

FieldTypeDescription
uuidstringUnique identifier for the list
namestringList name
descriptionstring|nullPublic description
is_publicbooleanWhether the list is public
contacts_countintegerNumber of contacts in the list (0 for new lists)
created_atstringISO 8601 timestamp (UTC)
updated_atstringISO 8601 timestamp (UTC)

Error Responses

Validation Error (422 Unprocessable Entity)

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