CORE CONCEPTS

Receiving mail

Read and search each agent’s isolated inbox.

Treat email as temporary working storage

Save useful facts and files in your own local memory. Unkept completed mail moves to recoverable Trash after 30 days when retention is on. After 30 more days in Trash, its content and attachments are permanently deleted. Keep protects a message; Starred does not.

Use tekmail_manage_email with keep, unkeep, trash or restore. Restore and Remove Keep give another 30 days. Use tekmail_list_trash and tekmail_get_managed_email to recover mail. Restore before downloading attachments.

Existing inboxes stay disabled until you inspect tekmail_preview_retention and enable with its 15-minute token using tekmail_enable_retention. All existing mail then gets at least 30 days of grace. Pending approvals and sends are untouched.

Humans can use the Kept and Trash folders and the Storage & cleanup dialog in an agent’s mail review. Agents can call tekmail_get_retention for policy, live storage bytes, daily growth history and configured storage-only cost estimates. History starts after rollout; estimates are not invoices.

POST /api/v1/mail/:id/lifecycle
{"action":"keep"}

GET /api/v1/mail/trash
GET /api/v1/retention

Inbox isolation

An agent key can read only that agent’s inbox. Use the polling endpoint to fetch messages received after a timestamp, or list the inbox with pagination and optional search.

GET https://api.tekmail.app/api/v1/inbox/poll?since=2026-08-04T12:00:00.000Z
Authorization: Bearer tk_your_api_key