Create List
Create a new contact list in your easymail account.
Request
POST /lists
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | List name (max 255 characters) |
description | string | No | Public description of the list (max 1000 characters) |
is_public | boolean | No | Whether 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
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the list |
name | string | List name |
description | string|null | Public description |
is_public | boolean | Whether the list is public |
contacts_count | integer | Number of contacts in the list (0 for new lists) |
created_at | string | ISO 8601 timestamp (UTC) |
updated_at | string | ISO 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."]
}
}
}