Docs

Transactional Emails

POST

Send Transactional Email

POST /v1/emails/send

Send a transactional email to one or more recipients.

Use Cases:

  • Order confirmation emails
  • Password reset emails
  • Account verification emails
  • Payment receipts
  • Shipping notifications
  • Welcome emails
  • Any one-off automated email

Content Modes:
You can send emails in two ways:

  1. Raw HTML Mode: Provide html (required) and optionally text content directly
  2. Template Mode: Reference a published template by its uniqueSlug identifier

These modes are mutually exclusive - provide either template or html, not both.

Template-Based Sending:

{
  "from": "noreply@yourdomain.com",
  "to": "customer@example.com",
  "template": {
    "id": "order_confirmation",
    "variables": {
      "firstName": "John",
      "orderNumber": "12345",
      "total": 99.99
    }
  }
}

When using templates:

  • The template must be published (have a publishedVersionId)
  • Variables are substituted using {{variableName}} syntax
  • Missing variables are replaced with empty strings
  • Subject and previewText can be overridden by providing them in the request
  • The text field cannot be used with templates (it comes from the template)

Behavior:

  • Email is queued and sent asynchronously
  • Returns immediately with the email send ID
  • Delivery status is tracked via webhooks
  • Supports HTML and plain text content
  • Plain text is auto-generated from HTML if not provided
  • Supports attachments (up to 25 files, 25MB total)
  • Custom metadata can be attached for tracking

Required Scope: smtp:send

Rate Limits:

  • 100 emails per minute per API key
  • Maximum 10MB HTML content
  • Maximum 25 attachments (total 25MB)

Delivery Tracking:

  • Use the returned email ID to track delivery status
  • Configure webhooks to receive delivery notifications
  • Events: delivered, bounced, complained, opened, clicked

Best Practices:

  • Always include a plain text version for accessibility
  • Keep HTML under 100KB for best deliverability
  • Use verified sending domains only
  • Include unsubscribe links for marketing content

Bodyrequired

fromstring<email>required

Sender email address (must be from a verified sending domain)

Min length: 1Max length: 255
toanyrequired

Recipient email address(es) - single email or array of emails

replyToobject

Custom reply-to address (optional)

subjectstring

Email subject line (required when not using template, optional override when using template)

Min length: 1Max length: 500
previewTextstring

Preview text shown in email clients (optional, overrides template value if provided)

Max length: 150
htmlstring

HTML email body content (required when not using template)

Min length: 1Max length: 10000000
textstring

Plain text email body content (auto-generated from HTML if not provided, cannot be used with template)

Max length: 10000000
templateobject

Template-based sending: provide template identifier and variables instead of html/text

attachmentsobject[]

Email attachments (max 25 files, 25MB total)

Max items: 25
metadataobject

Custom metadata for tracking (key-value pairs)

Response

201Email queued successfully. The email will be sent asynchronously. Use the returned ID to track delivery status via webhooks.
objectstringrequired

Object type identifier

idstringrequired

Unique email send ID for tracking

Copyright © 2026 Kibamail.·Privacy Policy