LFMail API · v1

Your inbox, connected to your systems.

Read messages and download the original email with a dedicated key for each integration.

Start in webmail

  1. Open Settings → Apps and integrations.
  2. Create a key and select your primary mailbox or a subaccount.
  3. Copy the key once and keep it on your application server.
curl --fail-with-body \
  -H "Authorization: Bearer $LFMAIL_API_KEY" \
  "https://mail.lfmail.com.br/api/v1/messages?limit=25"
mail:read

One key. One mailbox.

Each key provides read-only access to the selected mailbox, has an expiry date and can be revoked immediately. Aliases deliver to the primary mailbox. Subaccounts keep messages separate.

Endpoints

  • GET/mailbox
  • GET/messages?limit=25
  • GET/messages/{id}
  • GET/messages/{id}/raw
Download OpenAPI specification

Predictable synchronization

Poll periodically, paginate with limit and position, and store processed IDs. Mailbox changes can shift pages: deduplicate by ID. Limits: 60 requests per minute per key and 120 per IP. On 429, honor Retry-After; use exponential backoff for temporary failures.

Protect your integration

Send the key only in the Authorization header over HTTPS. Never put it in URLs, public JavaScript or logs. Treat HTML and attachments as untrusted. The API cannot send, modify or delete messages.

How messages arrive

Your @lfmail.com.br address receives through Cloudflare. Transport temporarily stores encrypted messages, checks the delivery signature and scans for viruses before importing into the mailbox. The inbound limit is 25 MiB including attachments and encoding. Sending and third-party webhook notifications are not available in this version.