Skip to content

For developers

The receipt is easy. Knowing it landed is the work.

Send a receipt from a verified domain, then treat the API response as acceptance and a provider event as delivery. Bonga keeps those moments separate — including the ugly one where the outcome is unknown.

The v2 email contract shown here is a preview. Configured senders can display readiness_reason: “not_qualified” until a route is qualified; the v1 route and dashboard remain the production paths today.

receipts@kijani.co.ke

Verified domain · kijani.co.ke

v2 preview

To wanjiru@example.com

14:10 local

Your receipt - order 4821

Thanks Wanjiru. Your linen set is paid and ready for pickup at Kilimani.

Receipt

Kijani Home · 05 Dec 2026

KES 4,800

  1. Recorded

    202 · durable request

  2. Queued

    waiting for a worker

  3. Sent

    provider accepted

  4. Delivered

    receipt only

POST /api/v2/messages202 Accepted · msg_7c4a…
Sample content and sample identifiers. The response records acceptance; only the last state is a delivery claim.
Messaging and provider charges are separate from the workspace plan. See pricing

Production path

The v1 route sends today.

The v1 route is registered for existing integrations. It records an email log and queues the provider handoff, so it works even where the v2 email preview is not enabled.

Both routes return acceptance. Delivery arrives later as a separate event. Keep the log ID for support, and do not treat a 200 or 202 as proof that the message landed.

Read the production email contract
Send a receiptv1 · live
POST /api/v1/email/send
Authorization: Bearer $BONGA_API_KEY
Content-Type: application/json

{
  "to": "wanjiru@example.com",
  "subject": "Your receipt - order 4821",
  "body": "<p>Thanks for your order. Total KES 4,800.</p>",
  "purpose": "transactional"
}
Queued200 · pending
HTTP/1.1 200 OK

{
  "success": true,
  "message": "Email queued",
  "data": {
    "id": "email_log:...",
    "recipient": "wanjiru@example.com",
    "status": "pending"
  }
}

Two different moments

The API call can succeed before the recipient’s provider has made a decision. A receipt is useful only when the UI says which moment it is describing.

202

Bonga recorded the request

The workspace, sender, recipient, purpose and idempotency key are durable. A worker may not have touched a provider yet. Store the message ID and stop calling this “sent”.

receipt

The provider confirmed delivery

A later event sets delivered with evidence. It is a new revision, not a rewritten success. Without that evidence, leave the row alone or reconcile it.

Email message states and what each one means
Status What it means
queuedBonga recorded the request. No provider attempt is implied.
sentThe sending provider accepted the message for handoff.
deliveredA provider receipt confirms the destination received it.
failedA definite refusal or bounce. Read the error before changing anything.
submission_unknownThe provider may have accepted it. Reconcile; never resend automatically.

An email open is not a read. Track opens and clicks for engagement, but do not turn them into a delivery or read claim.

The sender is part of the message

A beautiful receipt from an unverified domain is a bounce with better typography. The From address, the domain records and the provider connection all have to agree.

The v2 request uses an opaque sender ID, not a raw address. Discovery gives you the candidate; the workspace decides whether it is ready.

Read the email setup

A verified domain carries the identity

SPF
Authorizes the sending infrastructure. Keep one SPF record per domain.
DKIM
Signs the message. Managed delivery can hold the key; a connected provider uses its own.
DMARC
Tells receivers what to do when authentication fails. Start at monitoring, then tighten.
Return-Path
Routes bounces back to the sender that can explain them.

A verified domain authorizes configured From addresses; it is not itself a From address. Bonga rechecks the domain before handoff.

Managed delivery

Bonga operates the sending infrastructure, domain checks and signed delivery events. Choose it when you want one vendor for the path.

Bring your provider

Connect SMTP or Resend on an eligible workspace, verify the connection and keep the From domain valid. The provider’s events still have to be trusted evidence.

A transactional receipt stays transactional. Marketing mail carries its unsubscribe and suppression checks. A hard suppression applies to both.

The exchange, without the hand-waving

One request records the receipt. A later read reports what the provider has proven. Both responses use the same envelope, so the difference lives in the status and its revision.

Send the receiptPOST /api/v2/messages
POST /api/v2/messages
Authorization: Bearer $BONGA_API_KEY
Idempotency-Key: receipt-4821
Content-Type: application/json

{
  "channel": "email",
  "from": "snd_kijani04",
  "to": "wanjiru@example.com",
  "content": {
    "type": "email",
    "subject": "Your receipt - order 4821",
    "text": "Thanks for your order. Total KES 4,800.",
    "html": "<p>Thanks for your order. Total <strong>KES 4,800</strong>.</p>"
  },
  "purpose": "transactional"
}
Accepted202 · queued
HTTP/1.1 202 Accepted
Location: /api/v2/messages/msg_7c4a91d2e6b8f0a1

{
  "success": true,
  "message": "Message queued",
  "data": {
    "id": "msg_7c4a91d2e6b8f0a1",
    "workspace_id": "workspace:...",
    "channel": "email",
    "sender_id": "snd_kijani04",
    "destination": "wanjiru@example.com",
    "status": "queued",
    "revision": 1,
    "purpose": "transactional",
    "created_at": "2026-12-05T11:10:10Z",
    "updated_at": "2026-12-05T11:10:10Z"
  }
}
Later read200 · sent, not delivered
GET /api/v2/messages/msg_7c4a91d2e6b8f0a1

{
  "success": true,
  "message": "Message status",
  "data": {
    "id": "msg_7c4a91d2e6b8f0a1",
    "channel": "email",
    "sender_id": "snd_kijani04",
    "destination": "wanjiru@example.com",
    "status": "sent",
    "revision": 2,
    "updated_at": "2026-12-05T11:10:14Z"
  }
}

The same Idempotency-Key and payload returns the original message on retry. A different payload under that key is a conflict. Keep the key with your order, not just in a local variable.

Receiving is a separate door

Sending proves what left. Receiving needs a domain whose MX points at Bonga, a rule for the address and a decision about whether to keep a copy, call your webhook or forward it. That is the programmable-inbox job, not a reply-to on a receipt.

Pilot boundary

v2 email can be off or unqualified on this deployment. A configured sender remains visible with ready: false until its route passes qualification. Use the dashboard or an existing v1 integration for production mail today.

Ask about enablement

One workspace

Start with the job you have. Add the next channel when you need it.

Contacts, consent, delivery evidence and team access stay in one place as you grow from one channel to three.