/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

ParamTypeRequiredDescription
limitintNoPage size. Default 50, clamped to 1..200.
pageintNo1-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
  }
}
FieldTypeDescription
email_id / idhex string16-byte GUID hex.
subjectstring"(No Subject)" when empty.
body_previewstringFirst 200 chars of the body, only present when body is non-empty.
last_modifiedint (unix epoch)Most recent save time.
recipient_countintTO + CC count.
is_starredboolUser-set star.

Errors

HTTPMessage
500Failed to query drafts

Example

curl "http://localhost:8081/api/qmail/db/drafts/list?limit=20"

Related