A code-backed overview of the Bavimail API surface
This page mirrors the checked-in backend route groups, supported auth modes, and the route areas that are internal-only or debug-only.
Last updated May 29, 2026
How the API is structured
Bavimail exposes JSON endpoints grouped by operational surface: sending, domains, inbound mail, conversations, analytics, suppressions, tags, and webhooks. The public docs should match the backend route tree rather than promising generic capability buckets or production-only tooling that is not actually exposed.
Public route groups
Emails
Send email, batch sends, scheduled delivery, cancellation, validation, tracked links, clicks, and email lifecycle events.
/emails /emails/batch /emails/validate /emails/{email_id}/cancel
Domains
Create domains, fetch DNS setup, check DNS verification, update settings, and delete domains.
/domains /domains/{domain_id}/setup /domains/{domain_id}/dns-status
Aliases
Create aliases, list them, update them, and manage warmup tokens.
/aliases /aliases/{alias_id} /aliases/{alias_id}/warmup-token
Attachments
Upload stored attachments, read their metadata, and download their bytes.
/attachments /attachments/{attachment_id} /attachments/{attachment_id}/download
Inbound Emails
List inbound mail, fetch full detail, download raw messages and attachments, manage tags, and mark read state.
/inbound-emails /inbound-emails/{email_id} /inbound-emails/{email_id}/raw
Inbox Threads
Read inbox thread summaries and thread detail views.
/threads /threads/{conversation_id}
Conversations
Inspect conversations and update read state for conversation views.
/conversations /conversations/{conversation_id} /conversations/{conversation_id}/mark-read
Analytics
Read deliverability summary, timeseries, and recent delivery rows.
/analytics/deliverability/summary /analytics/deliverability/timeseries /analytics/deliverability/recent
Suppressions
List suppressions, create suppressions, and release suppressed recipients.
/suppressions /suppressions/{suppression_id}/release
Tags
Create and manage reusable tags for inbound and mailbox workflows.
/tags /tags/{tag_id}
Webhooks
Create webhooks, verify them, resend verification, test deliveries, rotate secrets, and delete endpoints.
/webhooks /webhooks/{webhook_id}/verify /webhooks/{webhook_id}/rotate-secret
Accepted authentication modes
Authorization: Bearer <Clerk session token>
x-api-key: <API key>
Session cookie: Clerk session cookie
Internal or conditional surfaces
01
Integration routes under /integrations are mounted only when service auth is enabled and are excluded from the public schema.
02
Internal system sender domain routes are excluded from the public schema.
03
Development routes are mounted only when DEBUG is true.
04
FastAPI OpenAPI/Swagger/ReDoc are exposed only when DEBUG is true.
How fast is email delivery?
Our API responds quickly at most volumes. Emails are queued, DKIM-signed, and dispatched within milliseconds. Most messages reach the inbox in seconds, depending on the recipient mail provider.
Implementation Order
If you are integrating Bavimail for the first time, follow this order:
- Authenticate: Create an API key and confirm access with a test request.
- Verify a domain: Add DNS records so you can send from your domain.
- Send email: Use the Emails API to send your first message.
- Subscribe to webhooks: Get real-time delivery and engagement events.