Skip to content
AI Inbx
Esc
navigateopen⌘Jpreview

Send an email

Sends an email. Requires a from address on a verified domain or a connected mailbox, and at least one of html or text. Recipients on a matching suppression list are dropped and reported in suppressed; a pacing rule that holds the message is reported in pacing. Pass Idempotency-Key so a retry after a timeout replays the original send instead of sending twice.

POST/emails
Authorization
AuthorizationBearer token (API key) · headerrequired
Pass an AI Inbx API key as a Bearer token.
Header parameters
Idempotency-Keystring
Makes a send safe to retry. Reuse only for the same request body.
min length 1 · max length 255
Request body
requiredapplication/json
fromstring | objectrequired
Show properties
Any of:
string
string
object
namestring
min length 1 · max length 200
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> | string<email>[]required
Show properties
Any of:
string<email>
string<email>
string<email>[]
Array of string<email>
string<email>
subjectstringrequired
max length 998
thread_idstring
matches ^[a-z]+_[0-9a-f]{32}$
ccstring<email> | string<email>[]
Show properties
Any of:
string<email>
string<email>
string<email>[]
Array of string<email>
string<email>
bccstring<email> | string<email>[]
Show properties
Any of:
string<email>
string<email>
string<email>[]
Array of string<email>
string<email>
reply_tostring<email> | string<email>[]
Show properties
Any of:
string<email>
string<email>
string<email>[]
Array of string<email>
string<email>
attachmentsobject[]
max items 20
Show properties
Array of object
filenamestringrequired
min length 1 · max length 255
content_typestringrequired
min length 1 · max length 255
contentstringrequired
max length 4000000
cidstring
max length 998
headersobject
suppression_keystring
min length 1 · max length 256
pacingobject
Show properties
skipboolean
countboolean
scheduled_atstring<date-time>
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|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
htmlstring
max length 2000000
textstring
max length 2000000
unsubscribeboolean
Responses
200An idempotent request replayed the existing email.
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
thread_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
space_idstring | anyrequired
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
any
any
directionstringrequired
Allowed:inboundoutbound
statusstringrequired
Allowed:scheduledcanceledqueuedsendingsentdeliveredbouncedcomplainedfailedreceived
fromobjectrequired
Show properties
namestring | any
Show properties
Any of:
string
string
any
any
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>[]
bccstring<email>[]
reply_tostring<email>[]
subjectstringrequired
snippetstringrequired
htmlstring | any
Show properties
Any of:
string
string
any
any
textstring | any
Show properties
Any of:
string
string
any
any
categorystring | anyrequired
Show properties
Any of:
string
string
any
any
suppression_keystring | anyrequired
Show properties
Any of:
string
string
any
any
message_idstringrequired
in_reply_tostring | anyrequired
Show properties
Any of:
string
string
any
any
idempotency_keystring | anyrequired
Show properties
Any of:
string
string
any
any
created_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))$
scheduled_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
sent_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
attachmentsobject[]
Show properties
Array of object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
filenamestringrequired
content_typestringrequired
sizeintegerrequired
min 0 · max 9007199254740991
cidstring | anyrequired
Show properties
Any of:
string
string
any
any
download_urlstring<uri>required
preparationobject | anyrequired
Show properties
Any of:
object
statusstringrequired
Allowed:readypartialunsupportedfailed
formatstring | anyrequired
Show properties
Any of:
string
string
any
any
pagesinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
warningsstring[]required
content_urlstring<uri> | anyrequired
Show properties
Any of:
string<uri>
string<uri>
any
any
textstring | any
Show properties
Any of:
string
string
any
any
any
any
suppressedstring<email>[]required
pacingobject | anyrequired
Show properties
Any of:
object
held_byobjectrequired
Show properties
One of:
object
kindstringrequired
object
kindstringrequired
rule_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
object
kindstringrequired
rule_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
estimated_send_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
any
any
201The email was accepted.
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
thread_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
space_idstring | anyrequired
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
any
any
directionstringrequired
Allowed:inboundoutbound
statusstringrequired
Allowed:scheduledcanceledqueuedsendingsentdeliveredbouncedcomplainedfailedreceived
fromobjectrequired
Show properties
namestring | any
Show properties
Any of:
string
string
any
any
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>[]
bccstring<email>[]
reply_tostring<email>[]
subjectstringrequired
snippetstringrequired
htmlstring | any
Show properties
Any of:
string
string
any
any
textstring | any
Show properties
Any of:
string
string
any
any
categorystring | anyrequired
Show properties
Any of:
string
string
any
any
suppression_keystring | anyrequired
Show properties
Any of:
string
string
any
any
message_idstringrequired
in_reply_tostring | anyrequired
Show properties
Any of:
string
string
any
any
idempotency_keystring | anyrequired
Show properties
Any of:
string
string
any
any
created_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))$
scheduled_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
sent_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
attachmentsobject[]
Show properties
Array of object
idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
filenamestringrequired
content_typestringrequired
sizeintegerrequired
min 0 · max 9007199254740991
cidstring | anyrequired
Show properties
Any of:
string
string
any
any
download_urlstring<uri>required
preparationobject | anyrequired
Show properties
Any of:
object
statusstringrequired
Allowed:readypartialunsupportedfailed
formatstring | anyrequired
Show properties
Any of:
string
string
any
any
pagesinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
warningsstring[]required
content_urlstring<uri> | anyrequired
Show properties
Any of:
string<uri>
string<uri>
any
any
textstring | any
Show properties
Any of:
string
string
any
any
any
any
suppressedstring<email>[]required
pacingobject | anyrequired
Show properties
Any of:
object
held_byobjectrequired
Show properties
One of:
object
kindstringrequired
object
kindstringrequired
rule_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
object
kindstringrequired
rule_idstringrequired
matches ^[a-z]+_[0-9a-f]{32}$
estimated_send_atstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
any
any
400The request is invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
401The API key is missing or invalid.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
403The API key does not have the required scope.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
404The requested resource does not exist.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
409The request conflicts with the resource's current state.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
413The request body or attachments are too large.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
415The request body is not JSON.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
422The request body failed validation.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
429The organisation's request budget is spent (`too_many_requests`), or an upstream mail provider is throttling (`rate_limited`).
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
500An internal error occurred.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
502An upstream mail provider failed.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
503The service is temporarily unavailable.
typestringrequired
titlestringrequired
statusintegerrequired
min -9007199254740991 · max 9007199254740991
detailstringrequired
codestringrequired
request_idstringrequired
issuesobject[]
Show properties
Array of object
pathstringrequired
messagestringrequired
Request
curl -X POST "https://api.aiinbx.com/api/v2/emails" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "from": "string",
  "to": "user@example.com",
  "subject": "string",
  "thread_id": "string",
  "cc": "user@example.com",
  "bcc": "user@example.com",
  "reply_to": "user@example.com",
  "attachments": [
    {
      "filename": "string",
      "content_type": "string",
      "content": "string",
      "cid": "string"
    }
  ],
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "suppression_key": "string",
  "pacing": {
    "skip": true,
    "count": true
  },
  "scheduled_at": "2019-08-24T14:15:22Z",
  "html": "string",
  "text": "string",
  "unsubscribe": true
}'
Response
{
  "id": "eml_0123456789abcdef0123456789abcdef",
  "thread_id": "thr_0123456789abcdef0123456789abcdef",
  "space_id": null,
  "direction": "outbound",
  "status": "queued",
  "from": {
    "address": "hello@mail.example.com"
  },
  "to": [
    "customer@example.net"
  ],
  "subject": "Your order is confirmed",
  "snippet": "Thanks for your order. Reply to this email if you need help.",
  "category": null,
  "suppression_key": null,
  "message_id": "<order-123@mail.example.com>",
  "in_reply_to": null,
  "idempotency_key": "order-123-confirmation",
  "created_at": "2026-09-05T10:00:00Z",
  "scheduled_at": null,
  "sent_at": null,
  "suppressed": [],
  "pacing": null
}