Taifa MailTaifa Mail Docs
Integrations

REST API

Send email from any backend with a single authenticated HTTPS request to the Taifa Mail API.

The REST API is the most direct way to integrate Taifa Mail. One authenticated POST sends a message from your verified domain. It works from any language or framework.

Use cases

  • Send password resets, receipts and one-time passcodes from your backend.
  • Trigger transactional mail from any language without an SDK.
  • Queue and batch thousands of messages from your own workers.

Step 1: Create an API key

  1. In the dashboard, go to Settings -> API Keys.
  2. Create a key with the emails:send scope.
  3. Copy the tfm_k_live_... secret. It is shown only once.

Step 2: Send a message

Send a POST to https://govconnect.ke/v1/emails/ with a Bearer token.

curl -X POST 'https://govconnect.ke/v1/emails/' \
  -H 'Authorization: Bearer tfm_k_live_xxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "from_": { "email": "receipts@yourbusiness.co.ke" },
    "to": [{ "email": "customer@example.com" }],
    "subject": "Your receipt",
    "html": "<strong>Asante!</strong> Your order is on the way."
  }'

Step 3: Follow delivery

The response includes an email id. Fetch its status, or wire a webhook to react to events.

The full request and response schema lives in the Emails API reference. Official SDKs are documented under SDKs.

Next steps

On this page