Skip to main content
POST
email.send

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string
required

Required: this capability has an external effect.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$
Pramaan-Account
string

Optional. One of your account ids (GET /v1/accounts): run on that account, whatever your routing rules say. The response header X-Pramaan-Account names the account that ran.

Pramaan-End-User
string

Optional. Your own tag for your end user: a sticky: end_user rule keeps them on the account that first served them.

Maximum string length: 256
Pramaan-End-User-Group
string

Optional. Your end user's group, matched by rules with endUserGroup.

Maximum string length: 64

Body

application/json
to
required

Recipient email address, or a list of them.

Required string length: 1 - 320
Pattern: ^[^\s@<>",;]+@[^\s@<>",;]+\.[^\s@<>",;]+$
subject
string
required

Subject line, up to 998 characters.

Required string length: 1 - 998
Pattern: ^(?:[^\p{Cc}\p{Zl}\p{Zp}]|\t)*$
sender
enum<string>

Defaults to your own connected Gmail or Outlook (one person writing to another). Connect first with apps.connection.start. Choose "pramaan" for your app's own mail to its users (receipts, resets, invitations), sent from Pramaan's managed domain mail.example.com with replies to your member email.

Available options:
own,
pramaan
from
string

Optional sender: omit to use your connected Gmail or Outlook address. Connect first with apps.connection.start. With sender: "pramaan", omit for no-reply@mail.example.com, or give an address on mail.example.com (e.g. hello@mail.example.com). Managed replies go to your member email.

Required string length: 1 - 400
Pattern: ^(?:[^\p{Cc}\p{Zl}\p{Zp}]|\t)*$
cc

Copy recipients.

Required string length: 1 - 320
Pattern: ^[^\s@<>",;]+@[^\s@<>",;]+\.[^\s@<>",;]+$
bcc

Hidden copy recipients.

Required string length: 1 - 320
Pattern: ^[^\s@<>",;]+@[^\s@<>",;]+\.[^\s@<>",;]+$
replyTo
string

Address that replies go to.

Required string length: 1 - 320
Pattern: ^[^\s@<>",;]+@[^\s@<>",;]+\.[^\s@<>",;]+$
autoSubmitted
enum<string>

Mark automatic mail so recipients can prevent reply loops.

Available options:
auto-generated,
auto-replied
inReplyTo
string

RFC Message-ID of the parent message.

Maximum string length: 998
Pattern: ^<[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+(?:\.[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*>$
references
string[]

Thread history: at most 20 RFC Message-IDs and 4,096 bytes.

Maximum array length: 20
Maximum string length: 998
Pattern: ^<[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+(?:\.[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*>$
attachments
object[]

Uploaded attachments, at most 10 files and 6 MB combined, including any invitation.

Maximum array length: 10
invitation
object

A bounded calendar invitation rendered as invitation.ics, without uploading a file.

text
string

Plain-text body. Send text, html or both.

Required string length: 1 - 1000000
html
string

HTML body. Send text, html or both.

Required string length: 1 - 1000000
tags
object

Delivery metadata for your own analytics, as { name: value }. Up to 10 entries; letters, numbers, _ and - only.

Response

The result

trackable
boolean
required

Whether email.status can answer for the returned ref.

status
enum<string>
required

Whether the email was handed off or already sent.

Available options:
queued,
sent
acceptance
enum<string>

Confirmed acceptance or confirmed queueing; neither proves delivery.

Available options:
accepted,
queued
rfcMessageId
string

Final RFC Message-ID when confirmed, distinct from the message reference.

Maximum string length: 998
Pattern: ^<[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+(?:\.[A-Za-z0-9!#$%&'*+\-/=?^_`{|}~]+)*@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*>$
ref
string

Reference to what this call created. Pass it as ref to email.status.