Appearance
Pro Accounts
Manage mailboxes under your Pro account. Create mailboxes on system domains or your own verified custom domains.
List Mailboxes
GET /pro/api/accountsRequest
bash
curl https://api.mail.cx/pro/api/accounts \
-H "Authorization: Bearer tm_pro_xxxxxxxxxxxx"Response 200
json
{
"accounts": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"address": "info@yourdomain.com",
"quota": 52428800,
"used": 1048576,
"created_at": "2025-01-15T10:00:00Z"
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"address": "support@yourdomain.com",
"quota": 52428800,
"used": 0,
"created_at": "2025-01-16T12:00:00Z"
}
]
}Create a Mailbox
POST /api/accountsPro users create mailboxes via the same endpoint as free users (POST /api/accounts), but include their Pro Bearer token. This allows creating mailboxes on both system domains and verified custom domains.
Request
bash
curl -X POST https://api.mail.cx/api/accounts \
-H "Authorization: Bearer tm_pro_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"address":"info@yourdomain.com","password":"securepass"}'| Field | Type | Required | Description |
|---|---|---|---|
address | string | Yes | Email address (system domain or custom domain) |
password | string | Yes | Mailbox password |
Response 201
json
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"address": "info@yourdomain.com",
"token": "eyJhbGciOiJIUzI1NiIs..."
}TIP
Without a Pro Bearer token, only system domains are available. With a Pro token, you can also use your verified custom domains.
Errors
| Status | Error Code | Description |
|---|---|---|
| 400 | invalid_address | Invalid email format or unverified domain |
| 403 | account_limit_reached | Mailbox limit reached |
| 409 | address_taken | Address already in use |
Delete a Mailbox
DELETE /pro/api/accounts/{id}Permanently deletes the mailbox and all its emails.
Request
bash
curl -X DELETE https://api.mail.cx/pro/api/accounts/a1b2c3d4-... \
-H "Authorization: Bearer tm_pro_xxxxxxxxxxxx"Response 204
No content.
Reset Mailbox Password
PUT /pro/api/accounts/{id}/reset-passwordRequest
bash
curl -X PUT https://api.mail.cx/pro/api/accounts/a1b2c3d4-.../reset-password \
-H "Authorization: Bearer tm_pro_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"password":"newpassword123"}'Response 200
json
{
"message": "password_reset"
}Errors
| Status | Error Code | Description |
|---|---|---|
| 400 | password_too_short | Password too short |
| 404 | not_found | Mailbox not found |
List Mailbox Messages
GET /pro/api/accounts/{id}/messagesList messages for a specific mailbox without needing that mailbox's JWT token.
Parameters
| Name | In | Type | Default | Description |
|---|---|---|---|---|
id | path | uuid | — | Account ID |
page | query | integer | 1 | Page number |
Request
bash
curl https://api.mail.cx/pro/api/accounts/a1b2c3d4-.../messages?page=1 \
-H "Authorization: Bearer tm_pro_xxxxxxxxxxxx"Response 200
json
{
"messages": [
{
"id": "f5e6d7c8-a1b2-3c4d-e5f6-789012345678",
"sender": "noreply@example.com",
"from": "Example <noreply@example.com>",
"subject": "Welcome!",
"preview_text": "Thanks for signing up...",
"size": 3200,
"created_at": "2025-01-15T10:30:00Z"
}
],
"page": 1
}