Simulate an inbound email
Writes an email into a sandbox as if it came from outside. It is composed into MIME and goes through everything mail from outside goes through: parsing, classification, threading, attachment preparation, extraction and the email.received webhook. headers and verdicts set what the sender’s mail system and the receiving checks would, to try an automatic reply, a mailing list or spam. Every to has to be an address of the workspace, on one of its domains, or the request fails with 422 recipient_unknown. As with real mail, a copy is filed in each space its recipients are in; the response is the email filed for the first to. A bounce report is not filed as an email: it is handled as a real one is, and the request fails with 400 invalid_request; to try a bounce, send to bounce@simulator.aiinbx.com. Each copy filed counts as one of the sandbox’s emails for the day, and past them the request fails with 429 sandbox_limit_reached. On a live workspace it fails with 403 sandbox_only.
/sandbox/emailsAuthorizationBearer token (API key) · headerrequiredPass an AI Inbx API key as a Bearer token.
AIInbx-WorkspacestringWorkspace id from GET /workspaces, for an OAuth token that reaches several.
application/jsonfromstring | objectrequiredWho writes, dana@example.net or Dana <dana@example.net>: anyone.
Show propertiesHide properties
stringnamestringaddressstring<email>requiredtostring<email> | string<email>[]requiredAddresses of this workspace, each on one of its domains: one address or a list, at most 100.
Show propertiesHide properties
string<email>string<email>string<email>ccstring<email> | string<email>[]Cc recipients: one address or a list, at most 100.
Show propertiesHide properties
string<email>string<email>string<email>reply_tostring<email> | string<email>[]Where replies go (Reply-To), when not to the sender: one address or a list, at most 100.
Show propertiesHide properties
string<email>string<email>string<email>subjectstringThe subject line.
in_reply_tostringThe Message-ID the email answers, with or without angle brackets: one the workspace sent, to write a reply into its thread.
referencesstring[]The Message-IDs of the conversation so far, oldest first. in_reply_to is added at the end when it is not already there.
attachmentsobject[]Files attached, at most 20 and 3 MB decoded in total: filename, content_type and content in base64, and a cid to make one an inline image.
Show propertiesHide properties
objectfilenamestringrequiredcontent_typestringrequiredcontentstringrequiredcidstringtextstringThe plain-text body.
htmlstringThe HTML body.
headersobjectExtra headers on the email, as the sender's mail system wrote them: Auto-Submitted: auto-replied or X-Autoreply for an automatic reply, Precedence: bulk, List-Id and List-Unsubscribe for a mailing list, or headers of your own. They are on the email's headers, and its category is read from them as from real mail's. From, Sender, To, Cc, Bcc, Reply-To, Subject, Date, Message-ID, In-Reply-To, References, MIME-Version and Content-* are written from the request and are refused.
verdictsobjectWhat the receiving checks made of the email, as its verdicts reads them back: each PASS or FAIL, PASS when left out. spf, dkim and dmarc are recorded as given.
Show propertiesHide properties
spamstringFAIL files the email as spam: it still arrives and fires email.received, with the category spam.
PASSFAILspfstringPASSFAILdkimstringPASSFAILdmarcstringPASSFAILThe email arrived.
idstringrequiredthread_idstringrequiredspace_idstring | nullrequiredWhich space a resource is in. Null is the workspace itself — what every resource of a workspace that has no spaces says.
Show propertiesHide properties
stringnullsandboxbooleanrequiredWhether the workspace is a sandbox: the email was simulated, and nothing was sent to or received from outside AI Inbx.
directionstringrequiredinboundoutboundstatusstringrequireddraftscheduledcanceleddiscardedqueuedsendingsentdeliveredbouncedcomplainedfailedreceivedfromobjectrequiredShow propertiesHide properties
namestring | nullShow propertiesHide properties
stringnulladdressstring<email>requiredtostring<email>[]requireddelivered_tostring<email>[]requiredOn received mail, every address of yours it arrived at so far, whatever its To and Cc say. Empty on mail you sent.
ccstring<email>[]bccstring<email>[]reply_tostring<email>[]subjectstringrequiredsnippetstringrequiredhtmlstring | nullShow propertiesHide properties
stringnulltextstring | nullShow propertiesHide properties
stringnullcategorystring | nullrequiredShow propertiesHide properties
stringnullverdictsobject | nullrequiredShow propertiesHide properties
spamstring | nullrequiredPASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.
Show propertiesHide properties
stringnullspfstring | nullrequiredPASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.
Show propertiesHide properties
stringnulldkimstring | nullrequiredPASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.
Show propertiesHide properties
stringnulldmarcstring | nullrequiredPASS, FAIL, GRAY or PROCESSING_FAILED. Null when this check was not reported.
Show propertiesHide properties
stringnullnullverificationobject | nullrequiredShow propertiesHide properties
codestring | nullrequiredThe one-time code to type in, as the email writes it: 482913, 482 913, G-482913. Null when it gives none.
Show propertiesHide properties
stringnulllinkstring | nullrequiredThe link that verifies, confirms, signs in or resets, exactly as the email links it. Null when it has none.
Show propertiesHide properties
stringnullnullunavailableobject | nullrequiredShow propertiesHide properties
reasonstringrequiredabsent: away for now — holiday, leave, travel. left: no longer at this address. unmonitored: nobody reads it. More reasons may be added; treat one you do not know as unreachable.
absentleftunmonitoredback_onstring<date> | nullrequiredThe first day the sender is back, when the reply says. A reply away "until" a day is read as back the next working day. Null when it names no day, when that day had already passed when the reply arrived, and for left and unmonitored.
Show propertiesHide properties
string<date>nullcontactsstring<email>[]requiredAddresses the reply says to write to instead — a colleague, a team inbox. Empty when it names none.
nullsuppression_keystring | nullrequiredShow propertiesHide properties
stringnullmessage_idstringrequiredThe RFC Message-ID, without angle brackets.
in_reply_tostring | nullrequiredThe Message-ID of the message this one answers, without angle brackets. Null when it answers none.
Show propertiesHide properties
stringnullidempotency_keystring | nullrequiredShow propertiesHide properties
stringnullcreated_atstring<date-time>requiredWhen it took its place in its thread. A draft's moves to when it is sent — draft.drafted_at keeps when it was written.
scheduled_atstring<date-time> | nullrequiredShow propertiesHide properties
string<date-time>nullsent_atstring<date-time> | nullrequiredShow propertiesHide properties
string<date-time>nulldraftobject | nullrequiredShow propertiesHide properties
drafted_atstring<date-time>requirededited_atstring<date-time> | nullrequiredWhen its content last changed before it was sent. Null when it went as written.
Show propertiesHide properties
string<date-time>nullreview_urlstring<uri> | nullrequiredWhere a person reviews, edits and sends it in the console.
Show propertiesHide properties
string<uri>nullnullattachmentsobject[]Show propertiesHide properties
objectidstringrequiredfilenamestringrequiredcontent_typestringrequiredsizeintegerrequiredcidstring | nullrequiredShow propertiesHide properties
stringnulldownload_urlstring<uri> | nullrequiredSigned 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 propertiesHide properties
string<uri>nullexpires_atstring<date-time> | nullrequiredWhen 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 propertiesHide properties
string<date-time>nullpreparationobject | nullrequiredShow propertiesHide properties
statusstringrequiredreadypartialunsupportedfailedformatstring | nullrequiredShow propertiesHide properties
stringnullpagesinteger | nullrequiredShow propertiesHide properties
integernullwarningsstring[]requiredcontent_urlstring<uri> | nullrequiredSigned 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 propertiesHide properties
string<uri>nulltextstring | nullShow propertiesHide properties
stringnullnullThe request is invalid.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe API key is missing or invalid.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe workspace has no plan (plan_required), or its plan's allowance is used up (allowance_reached).
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe API key or token does not have the required scope, the operation is admin-only and the person it acts for (a key's creator) is not an admin, the token is connected as an inbox and the operation is not one an inbox may use, the workspace is a sandbox and the operation needs a live one or would pass one of a sandbox's ceilings, such as its 10 custom domains (sandbox_unavailable, detail names the limit), or the workspace is live and the operation simulates mail for a sandbox (sandbox_only).
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe requested resource does not exist.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe request conflicts with the resource's current state.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe request body or attachments are too large.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe request body is not JSON.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe request body failed validation (invalid_request, with issues naming each field), or names something the request cannot use, such as an attachment or a recipient the workspace does not have; code says which.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe organisation's request budget is spent (too_many_requests), an upstream mail provider is throttling (rate_limited), or a sandbox has used its emails for the day (sandbox_limit_reached), which going live lifts.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredAn internal error occurred.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredAn upstream mail provider failed.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequiredThe service is temporarily unavailable.
typestringrequiredtitlestringrequiredstatusintegerrequireddetailstringrequiredcodestringrequiredrequest_idstringrequiredissuesobject[]Show propertiesHide properties
objectpathstringrequiredmessagestringrequired