Send branded email, generate AI documents on your letterhead and schedule meetings from your own software. Everything the API sends uses your company's templates automatically.
https://tifamail.com/api/v1
data.Company admins create keys under Workspace → API keys. A key is shown once — store it in a secret manager. Send it as a Bearer token on every request. Keys act with the permissions of the admin who created them and can be revoked instantly.
curl https://tifamail.com/api/v1/me \
-H "Authorization: Bearer $TIFAMAIL_KEY"
Errors return an HTTP status and a body like {"error":{"code":"insufficient_credit","message":"…"}}. Each key may make 600 requests per hour.
| 401 unauthorized | Missing, malformed or revoked key. |
| 402 insufficient_credit | The AI pre-check estimated more than your credit or the user's monthly limit. |
| 402 workspace_inactive | Annual maintenance lapsed or workspace suspended. |
| 404 not_found | Unknown resource, or it belongs to another workspace. |
| 422 validation / request_failed | Invalid input; the message explains what to fix. |
| 429 rate_limited | Too many requests; retry after the hour window. |
Company details, AI credit and storage.
curl https://tifamail.com/api/v1/me \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"company":{"name":"Acacia & Partners","domain":"acaciapartners.co.ke","domain_verified":true,"currency":"KES"},"ai_credit":{"kes":482.15,"display":"KES 482.15"},"storage":{"used_bytes":52428800,"quota_bytes":10737418240}}}Every address in the workspace.
curl https://tifamail.com/api/v1/mailboxes \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":[{"id":3,"address":"accounts@acaciapartners.co.ke","display_name":"Accounts","user_id":2}]}AI requests, tokens and amounts charged for a month (defaults to the current month).
| month | string | YYYY-MM |
curl "https://tifamail.com/api/v1/usage?month=2026-09" \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"month":"2026-09","items":[{"feature":"document","model":"claude-sonnet-5-5","requests":12,"input_tokens":48210,"output_tokens":39822,"charged_kes":94.6}],"total_kes":94.6}}Newest first. Page with before_id.
| mailbox | string | Address or mailbox id (required) |
| folder | string | inbox · sent · drafts · archive · spam · trash |
| limit | int | 1–100, default 25 |
| before_id | int | Return messages older than this id |
curl "https://tifamail.com/api/v1/messages?mailbox=accounts@acaciapartners.co.ke&limit=10" \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":[{"id":881,"folder":"inbox","from":[{"name":"Tifa","email":"tifa@savannafoods.co.ke"}],"subject":"Payment sent","snippet":"We have paid INV-2026-0142…","date":"2026-09-30T08:14:02+00:00","read":false,"has_attachments":true}],"next_before_id":872}Full HTML and text body plus attachment metadata.
curl https://tifamail.com/api/v1/messages/881 \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"id":881,"subject":"Payment sent","html":"<p>…</p>","text":"…","attachments":[{"id":55,"filename":"receipt.pdf","mime":"application/pdf","size":48211}]}}Sends from any workspace address. Your HTML is placed inside the company's branded email template unless template is false.
| from | string | Workspace address (required) |
| to / cc / bcc | string[] | Recipients (up to 100 total) |
| subject | string | Subject line |
| html | string | Body HTML (or use text) |
| template | bool | Default true |
| attachments | object[] | {filename, mime, content_base64}, 25 MB total |
curl -X POST https://tifamail.com/api/v1/messages \ -H "Authorization: Bearer $TIFAMAIL_KEY" \ -H "Content-Type: application/json" \ -d '{"from":"accounts@acaciapartners.co.ke", "to":["tifa@savannafoods.co.ke"], "subject":"Invoice INV-2026-0142", "html":"<p>Hi Tifa, please find your invoice attached.</p>"}'
{"data":{"id":902,"status":"sent","message_id":"8f2c…@acaciapartners.co.ke"}}Returns the file as base64.
curl https://tifamail.com/api/v1/messages/881/attachments/55 \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"id":55,"filename":"receipt.pdf","mime":"application/pdf","size":48211,"content_base64":"JVBERi0xLjcK…"}}Drafts subject and body in your company voice. A cheaper model estimates the cost first; the request is declined with 402 if credit is insufficient. Billed at provider cost + 50%.
| from | string | Sender address (required — used for the sign-off) |
| prompt | string | What the email should say |
| tone | string | professional · friendly · formal · persuasive · concise · apologetic |
curl -X POST https://tifamail.com/api/v1/ai/email \ -H "Authorization: Bearer $TIFAMAIL_KEY" \ -d '{"from":"tifa.ben@acaciapartners.co.ke","prompt":"Remind Savanna Foods their invoice is 14 days overdue","tone":"friendly"}'
{"data":{"subject":"A friendly reminder about INV-2026-0142","html":"<p>Dear Tifa,</p>…","charged_kes":1.42}}Creates any business document on your letterhead. POST to /documents/{id} with a new prompt to revise it into a new version.
| prompt | string | Describe the document (required) |
curl -X POST https://tifamail.com/api/v1/documents \ -H "Authorization: Bearer $TIFAMAIL_KEY" \ -d '{"prompt":"Quotation for 40 ergonomic chairs at KES 12,500 each, delivery within Nairobi, valid 30 days"}'
{"data":{"id":41,"version":1,"title":"Quotation","html":"<h1 class=\"doc-title\">Quotation</h1>…","charged_kes":6.18,"view_url":"https://tifamail.com/document?id=41"}}Most recently updated first.
curl https://tifamail.com/api/v1/documents \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":[{"id":41,"title":"Quotation","version":2,"updated_at":"2026-09-30T09:00:00+00:00"}]}Returns the body HTML and a complete, print-ready letterhead HTML page (A4) you can render to PDF.
curl https://tifamail.com/api/v1/documents/41 \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"id":41,"title":"Quotation","version":2,"html":"…","letterhead_html":"<!DOCTYPE html>…"}}Each invitee receives a branded invitation with Confirm / Maybe / Decline buttons and an .ics calendar file.
| from | string | Organiser address (required) |
| title | string | Meeting title |
| starts_at | string | ISO 8601, e.g. 2026-10-14T10:00 |
| timezone | string | IANA zone, default Africa/Nairobi |
| duration | int | Minutes (default 30) |
| link / location / agenda | string | Optional |
| invitees | string[] | Guest emails (max 100) |
curl -X POST https://tifamail.com/api/v1/meetings \ -H "Authorization: Bearer $TIFAMAIL_KEY" \ -d '{"from":"tifa.ben@acaciapartners.co.ke","title":"Quarterly review", "starts_at":"2026-10-14T10:00","timezone":"Africa/Nairobi","duration":60, "link":"https://meet.google.com/abc-defg-hij","invitees":["tifa@savannafoods.co.ke"]}'
{"data":{"id":17,"sent":1,"errors":[]}}Live responses from every guest.
curl https://tifamail.com/api/v1/meetings/17 \
-H "Authorization: Bearer $TIFAMAIL_KEY"{"data":{"id":17,"title":"Quarterly review","status":"scheduled","invitees":[{"email":"tifa@savannafoods.co.ke","status":"accepted","responded_at":"2026-09-30T10:02:11+00:00"}]}}Your MX relay (Postfix pipe, Cloudflare Email Worker, or any service that can POST raw MIME) delivers incoming mail here. The platform matches recipients to hosted mailboxes, encrypts and files the message, and de-duplicates by Message-ID.
curl -X POST "https://tifamail.com/hook/inbound?secret=$INBOUND_SECRET&to=tifa@acme.co.ke" \
-H "Content-Type: message/rfc822" \
--data-binary @message.eml
Also accepts multipart form posts with the MIME in email, message, raw or body-mime.