Montara Mail

Endpoints

The routes of /api/v1, by resource.

All routes need a signed-in user unless noted. :id is a UUID.

Account

RouteDoes
GET /api/v1/auth/meThe signed-in user and session.
POST /api/v1/auth/sign-outEnds the session.
GET /api/v1/me/securityWhether you have a password and two-factor sign-in.
PATCH /api/v1/meName, avatar (an https URL) and timezone.
PUT /api/v1/me/passwordChange the password after checking the current one; ends every session and revokes your API keys.
GET /api/v1/me/activity-logsYour own activity.
GET, POST /api/v1/me/api-keysList your API keys, or create one: name, expires_in_days (1 to 365, default 90). The key is in the create answer only.
DELETE /api/v1/me/api-keys/:idRevoke a key.
POST /api/v1/auth/totp/enable, /disable, /generate-backup-codesTwo-factor sign-in.

Organizations

RouteDoes
GET, POST /api/v1/organizationsYours, or create one (you become its owner).
GET, PUT, DELETE /api/v1/organizations/:idRead, rename (owner), move to the trash (owner).
PUT /api/v1/organizations/:id/restore, DELETE /api/v1/organizations/:id/forceRestore from the trash, or delete for good.
GET /api/v1/organizations/:id/statsUnread inbox mail, spam and connected accounts.
GET /api/v1/organizations/:id/activity-logsThe organization's audit log.

Mailboxes and mail

RouteDoes
GET, POST /api/v1/organizations/:id/email-accountsList, or connect one (signs in over IMAP first, then syncs in the background).
POST /api/v1/organizations/:id/email-accounts/oauth/:providerStart an OAuth connection; answers the consent URL.
GET /api/v1/email-accounts/:id/mailsOne folder, filtered by importance and search, paginated.
POST /api/v1/email-accounts/:id/syncSync now.
DELETE /api/v1/email-accounts/:idDisconnect and drop the synced mail.
POST /api/v1/email-accounts/:id/sendSend a new mail: To and Cc (20 addresses in all), subject, text and HTML.
GET, PATCH /api/v1/mails/:idRead a mail; mark it read or starred, or set its importance.
POST /api/v1/mails/:id/move, DELETE /api/v1/mails/:idMove to inbox, archive, spam or trash; delete moves to the trash, or deletes for good from it.
POST /api/v1/mails/bulkOne action on many mails of one account and folder: read, unread, trash or move.
POST /api/v1/mails/:id/reply, /forwardReply (threaded, quoting the original) or forward (up to 20 addresses, optional note).

Send and reply take JSON, or multipart/form-data with that JSON in a payload field and the files in attachments (at most 10 files of 18 MB in all).

AI

RouteDoes
POST /api/v1/mails/:id/summaryThe AI summary (kept after the first call).
POST /api/v1/mails/:id/reply-suggestionsUp to three short replies.
POST /api/v1/mails/:id/draft-replyA whole reply written by the model.
POST /api/v1/mails/:id/skills/:keyRun a skill on the mail.
GET, PUT, DELETE /api/v1/organizations/:id/llm-providerThe organization's model (owner).
POST /api/v1/organizations/:id/llm-provider/modelsThe models a provider offers.
GET /api/v1/llm-providers, PUT, DELETE /api/v1/llm-providers/global, PUT /api/v1/llm-providers/:id/scopeProviders you can see; the global one and moving a provider (super user).

Agent

RouteDoes
POST /api/v1/agent/chatOne assistant turn, streamed as server-sent events.
GET, POST /api/v1/agent/conversations, GET, DELETE /api/v1/agent/conversations/:idConversation history.
POST /api/v1/agent/actions/:id/approve, /denyDecide a proposed mail.
GET /api/v1/agent/drafts, POST /api/v1/agent/drafts/:id/approve, /discardThe AI Drafts queue.
GET, POST /api/v1/organizations/:id/agent-bots, GET, PUT, DELETE /api/v1/agent-bots/:idAgent bots.
GET, POST /api/v1/organizations/:id/skills, PUT /api/v1/organizations/:id/skills/builtin/:key, PUT, DELETE /api/v1/skills/:idSkills.
GET, POST /api/v1/organizations/:id/mcp-servers, POST .../mcp-servers/testMCP servers the assistant calls.
PUT, DELETE /api/v1/mcp-servers/:id, POST /api/v1/mcp-servers/:id/sync, /test, /oauth/startManage one.

Outside /api/v1

RouteDoes
GET /health{"data":{"status":"ok"}}; no sign-in.
POST /mcpMCP for outside clients, with an API key. See Connect MCP clients.

On this page