Skip to content
AI Inbx
Esc
↑↓navigate↵open⌘Jpreview

email.sent

A message was handed to the mail provider: acceptance, not delivery.

POSTemail.sentWebhook
Header parameters
AIInbx-Signaturestringrequired

t=<unix seconds>,v1=<hmac>: an HMAC-SHA256 of the timestamp and the raw body, with one v1 per secret while a rotation's grace period runs.

AIInbx-Event-IDstringrequired

The event id, id in the body.

Request body
requiredapplication/json
idstringrequired

The event, evt_…. Stable across retries and replays: deduplicate on it.

matches ^[a-z]+_[0-9a-f]{32}$
typestringrequired
created_atstring<date-time>required

When the event happened.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
space_idstring | nullrequired

Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.

Show properties
Any of:
string
string
null
null
dataobjectrequired
Show properties
email_idstringrequired

The email, eml_…. Retrieve it for bodies and headers.

matches ^[a-z]+_[0-9a-f]{32}$
message_idstringrequired

The RFC Message-ID, without angle brackets.

thread_idstringrequired

The conversation it belongs to.

matches ^[a-z]+_[0-9a-f]{32}$
domain_idstring | nullrequired

The domain the message went through: received on or sent from. Null when it went through a mailbox.

Show properties
Any of:
string
string
null
null
mailbox_idstring | nullrequired

The mailbox the message went through: synced from or sent with. Null when it went through a domain.

Show properties
Any of:
string
string
null
null
fromstring<email>required

The sender.

matches ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
tostring<email>[]required

The recipients on the envelope.

subjectstringrequired

The subject line.

snippetstringrequired

A short preview of the body.

attachmentsobject[]
Show properties
Array of object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
filenamestringrequired
content_typestringrequired
sizeintegerrequired
min 0 · max 9007199254740991
preparationstringrequired
Allowed:readypartialunsupportedfailed
emailobject | null

Only on an endpoint whose payload is full: the email, exactly as GET /emails/{id}?include=attachment_content returns it. Read when the delivery is sent, so a retry carries freshly signed URLs. Null when it could not be included — the message no longer exists, or the body would pass 4 MB with it; read the email by email_id instead.

Show properties
Any of:
object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
thread_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
space_idstring | nullrequired

Which space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.

Show properties
Any of:
string
string
null
null
directionstringrequired
Allowed:inboundoutbound
statusstringrequired
Allowed:draftscheduledcanceleddiscardedqueuedsendingsentdeliveredbouncedcomplainedfailedreceived
fromobjectrequired
Show properties
namestring | null
Show properties
Any of:
string
string
null
null
addressstring<email>required
matches ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
tostring<email>[]required
ccstring<email>[]required
bccstring<email>[]required
reply_tostring<email>[]required
subjectstringrequired
snippetstringrequired
htmlstring | nullrequired
Show properties
Any of:
string
string
null
null
textstring | nullrequired
Show properties
Any of:
string
string
null
null
categorystring | nullrequired
Show properties
Any of:
string
string
null
null
verdictsobject | nullrequired
Show properties
Any of:
object
spamstring | nullrequired

PASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.

Show properties
Any of:
string
string
null
null
spfstring | nullrequired

PASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.

Show properties
Any of:
string
string
null
null
dkimstring | nullrequired

PASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.

Show properties
Any of:
string
string
null
null
dmarcstring | nullrequired

PASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.

Show properties
Any of:
string
string
null
null
null
null
suppression_keystring | nullrequired
Show properties
Any of:
string
string
null
null
message_idstringrequired

The RFC Message-ID, without angle brackets.

in_reply_tostring | nullrequired

The Message-ID of the message this one answers, without angle brackets. Null when it answers none.

Show properties
Any of:
string
string
null
null
idempotency_keystring | nullrequired
Show properties
Any of:
string
string
null
null
created_atstring<date-time>required

When it took its place in its thread. A draft's moves to when it is sent — draft.drafted_at keeps when it was written.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
scheduled_atstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
sent_atstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
draftobject | nullrequired
Show properties
Any of:
object
drafted_atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
edited_atstring<date-time> | nullrequired

When its content last changed before it was sent. Null when it went as written.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
review_urlstring<uri> | nullrequired

Where a person reviews, edits and sends it in the console.

Show properties
Any of:
string<uri>
string<uri>
null
null
null
null
attachmentsobject[]required
Show properties
Array of object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
filenamestringrequired
content_typestringrequired
sizeintegerrequired
min 0 · max 9007199254740991
cidstring | nullrequired
Show properties
Any of:
string
string
null
null
download_urlstring<uri> | nullrequired

Signed URL for the original bytes, good until expires_at. Opens without the API key, so treat it as a secret — and do not send the key to it: storage answers a request that carries an Authorization header with 400. To keep a reference, store the attachment id and call GET /attachments/{id}. Null when the bytes are gone.

Show properties
Any of:
string<uri>
string<uri>
null
null
expires_atstring<date-time> | nullrequired

When download_url and preparation.content_url stop working — an hour after the response. Read the email again, or call the download endpoint with the attachment ID, for fresh ones.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
preparationobject | nullrequired
Show properties
Any of:
object
statusstringrequired
Allowed:readypartialunsupportedfailed
formatstring | nullrequired
Show properties
Any of:
string
string
null
null
pagesinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
warningsstring[]required
content_urlstring<uri> | nullrequired

Signed URL for the prepared text, good until the attachment's expires_at. Opens without the API key — and only without it: storage answers a request that carries an Authorization header with 400. Null when there is no prepared text.

Show properties
Any of:
string<uri>
string<uri>
null
null
textstring | null
Show properties
Any of:
string
string
null
null
null
null
stripped_textstring | nullrequired

What this message says: typed text only, quoted conversation and signature removed. A signature the thread has not seen from this sender stays — it is where the name and role are.

Show properties
Any of:
string
string
null
null
stripped_htmlstring | nullrequired

The HTML part with the same cut as stripped_text: quoted conversation and repeated signature removed, an answer typed into the quote kept under the line it answers. Null when the message has no HTML part or its markup could not be matched to the cut.

Show properties
Any of:
string
string
null
null
segmentsobject[]required
Show properties
Array of object
kindstringrequired
Allowed:writtenquotedsignature
textstringrequired
referencesstring[]required

The Message-IDs of the conversation so far, oldest first, without angle brackets.

headersobject[]required
Show properties
Array of object
namestringrequired
valuestringrequired
eventsobject[]required
Show properties
Array of object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
typestringrequired
Allowed:draftededitedscheduledcanceleddiscardedqueuedreplayedsentdelivereddeferredbouncedcomplainedfailed
atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
recipientstring<email> | nullrequired
Show properties
Any of:
string<email>
string<email>
null
null
detailstring | nullrequired
Show properties
Any of:
string
string
null
null
engagementsobject[]required
Show properties
Array of object
kindstringrequired
Allowed:openclick
atstring<date-time>required
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
urlstring<uri> | nullrequired
Show properties
Any of:
string<uri>
string<uri>
null
null
user_agentstring | nullrequired
Show properties
Any of:
string
string
null
null
botbooleanrequired

True when a proxy, security scanner or script made the hit rather than the recipient.

bot_reasonstring | nullrequired

Why: privacy_proxy is Apple Mail Privacy Protection fetching on arrival, script an HTTP library, known_bot a scanner or link expander that names itself, stale_browser a browser build nobody runs any more, too_fast within seconds of delivery, sooner than a person could act. Null when bot is false. More reasons may be added; treat one you do not know as a bot.

Show properties
Any of:
string
string
null
null
null
null
suppression_keystring | nullrequired

The suppression list the send named, when it named one.

Show properties
Any of:
string
string
null
null
Responses
2XX

Acknowledges the delivery. Anything else, or no answer within 10 seconds, is retried; a Retry-After header is honoured over the standard backoff.

Payload
{
  "id": "string",
  "type": "email.sent",
  "created_at": "2019-08-24T14:15:22Z",
  "space_id": "string",
  "data": {
    "email_id": "string",
    "message_id": "string",
    "thread_id": "string",
    "domain_id": "string",
    "mailbox_id": "string",
    "from": "user@example.com",
    "to": [
      "user@example.com"
    ],
    "subject": "string",
    "snippet": "string",
    "attachments": [
      {
        "id": "string",
        "filename": "string",
        "content_type": "string",
        "size": 0,
        "preparation": "ready"
      }
    ],
    "email": {
      "id": "string",
      "thread_id": "string",
      "space_id": "string",
      "direction": "inbound",
      "status": "draft",
      "from": {
        "name": "string",
        "address": "user@example.com"
      },
      "to": [
        "user@example.com"
      ],
      "cc": [
        "user@example.com"
      ],
      "bcc": [
        "user@example.com"
      ],
      "reply_to": [
        "user@example.com"
      ],
      "subject": "string",
      "snippet": "string",
      "html": "string",
      "text": "string",
      "category": "human",
      "verdicts": {
        "spam": "string",
        "spf": "string",
        "dkim": "string",
        "dmarc": "string"
      },
      "suppression_key": "string",
      "message_id": "string",
      "in_reply_to": "string",
      "idempotency_key": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "scheduled_at": "2019-08-24T14:15:22Z",
      "sent_at": "2019-08-24T14:15:22Z",
      "draft": {
        "drafted_at": "2019-08-24T14:15:22Z",
        "edited_at": "2019-08-24T14:15:22Z",
        "review_url": "http://example.com"
      },
      "attachments": [
        {
          "id": "string",
          "filename": "string",
          "content_type": "string",
          "size": 0,
          "cid": "string",
          "download_url": "http://example.com",
          "expires_at": "2019-08-24T14:15:22Z",
          "preparation": {
            "status": "ready",
            "format": "markdown",
            "pages": -9007199254740991,
            "warnings": [
              "string"
            ],
            "content_url": "http://example.com",
            "text": "string"
          }
        }
      ],
      "stripped_text": "string",
      "stripped_html": "string",
      "segments": [
        {
          "kind": "written",
          "text": "string"
        }
      ],
      "references": [
        "string"
      ],
      "headers": [
        {
          "name": "string",
          "value": "string"
        }
      ],
      "events": [
        {
          "id": "string",
          "type": "drafted",
          "at": "2019-08-24T14:15:22Z",
          "recipient": "user@example.com",
          "detail": "string"
        }
      ],
      "engagements": [
        {
          "kind": "open",
          "at": "2019-08-24T14:15:22Z",
          "url": "http://example.com",
          "user_agent": "string",
          "bot": true,
          "bot_reason": "privacy_proxy"
        }
      ]
    },
    "suppression_key": "string"
  }
}
Response
Acknowledges the delivery. Anything else, or no answer within 10 seconds, is retried; a `Retry-After` header is honoured over the standard backoff.