QMail API Reference

Complete API reference for the QMail Client - a decentralized email system built on RAIDA technology.

Getting Started

The QMail API provides programmatic access to the QMail email client. All endpoints return JSON responses and the API is designed for easy integration with web interfaces and applications.

http://localhost:8080/api
29 Endpoints
10 Categories
0 Auth Required

Status

/api/health
GET
Health check endpoint. Returns server status and version information.
/api/qmail/ping
GET
Check for new mail by peeking at the beacon server for pending notifications.

Mailbox

/api/mail/create-mailbox
POST
Create a new QMail mailbox with denomination and serial number.
/api/mail/folders
GET
List available mail folders (inbox, sent, drafts, trash).
/api/mail/count
GET
Get unread and total email counts for each folder.

Email

/api/mail/list
GET
List emails in a folder with pagination support.
/api/mail/{id}
GET
Get metadata for a specific email by ID.
/api/mail/download/{id}
GET
Download the full email body content by ID.
/api/mail/{id}/read
PUT
Mark an email as read or unread.
/api/mail/{id}/move
PUT
Move an email to a different folder.
/api/mail/{id}
DELETE
Soft delete an email (move to trash).

Compose

/api/mail/send
POST
Send an email with optional attachments. Supports JSON or multipart/form-data.
/api/mail/drafts
GET
List all saved drafts with pagination.
/api/mail/draft
POST
Save a new draft email.
/api/mail/draft/{id}
PUT
Update an existing draft email.

Attachments

/api/mail/{id}/attachments
GET
List all attachments for an email.
/api/mail/{id}/attachment/{n}
GET
Download a specific attachment by index.

Contacts

/api/contacts
GET
List all contacts with pagination and search.
/api/contacts
POST
Add a new contact to the address book.
/api/contacts/{id}
DELETE
Delete a contact by ID.
/api/data/contacts/popular
GET
Get frequently contacted users sorted by contact count.

Search

/api/data/emails/search
GET
Full-text search across emails using FTS5.
/api/data/users/search
GET
Search users for recipient autocomplete.

Servers

/api/data/servers
GET
Get list of all QMail servers with status.
/api/admin/servers/parity
GET
Get current parity server configuration.
/api/admin/servers/parity
POST
Set the parity server for redundancy.

Admin

/api/admin/sync
POST
Trigger manual data sync from RAIDA servers.

Tasks

/api/task/status/{id}
GET
Get status of an async task by ID.
/api/task/cancel/{id}
POST
Cancel a running async task.