/api/qmail/db/drafts/list
GET
Return saved drafts. Paginated; each row includes a short body preview, recipient count, star flag, and last-modified timestamp.
Parameters
| Param | Type | Required | Description |
limit | int | No | Page size. Default 50, clamped to 1..200. |
page | int | No | 1-based page number. Default 1. |
Response
{
"command": "drafts-list",
"success": true,
"count": 1,
"drafts": [
{
"email_id": "0c4f8e2a91b34d57a76e1d2c3b4a5968",
"id": "0c4f8e2a91b34d57a76e1d2c3b4a5968",
"subject": "(No Subject)",
"body_preview": "Quick note about tomorrow'sā¦",
"last_modified": 1714083600,
"recipient_count": 2,
"is_starred": false
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 1,
"total_pages": 1
}
}
| Field | Type | Description |
email_id / id | hex string | 16-byte GUID hex. |
subject | string | "(No Subject)" when empty. |
body_preview | string | First 200 chars of the body, only present when body is non-empty. |
last_modified | int (unix epoch) | Most recent save time. |
recipient_count | int | TO + CC count. |
is_starred | bool | User-set star. |
Errors
| HTTP | Message |
| 500 | Failed to query drafts |
Example
curl "http://localhost:8081/api/qmail/db/drafts/list?limit=20"