Skip to content
AI Inbx
Esc
navigateopen⌘Jpreview

List emails

Lists emails in the workspace, newest first. Filter by direction, delivery status, a single thread_id, or a literal query over subjects and addresses. The query is a literal filter; the API does not provide semantic email search.

GET/emails
Authorization
AuthorizationBearer token (API key) · headerrequired
Pass an AI Inbx API key as a Bearer token.
Query parameters
limitinteger
Maximum number of resources to return.
min 1 · max 100 · default: 40
cursorstring
Opaque cursor from the previous page.
min length 1
spacestring
Only resources in this space. Pass `none` for resources that belong to the workspace itself (`space_id: null`), or omit for the workspace and all its spaces.
matches ^(?:none|spc_[0-9a-f]{32})$
directionstring
Filter by message direction.
Allowed:inboundoutbound
statusstring
Filter by delivery status.
Allowed:scheduledcanceledqueuedsendingsentdeliveredbouncedcomplainedfailedreceived
thread_idstring
Filter to one thread.
matches ^thr_[0-9a-f]{32}$
querystring
Search subjects and addresses.
max length 320
Responses
200Success.
dataobject[]required
Show properties
Array of object
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
next_cursorstring | anyrequired
Show properties
Any of:
string
string
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 GET "https://api.aiinbx.com/api/v2/emails" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "data": [
    {
      "id": "string",
      "thread_id": "string",
      "space_id": "string",
      "direction": "inbound",
      "status": "scheduled",
      "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",
      "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",
      "attachments": [
        {
          "id": "string",
          "filename": "string",
          "content_type": "string",
          "size": 9007199254740991,
          "cid": "string",
          "download_url": "http://example.com",
          "preparation": {
            "status": "ready",
            "format": "markdown",
            "pages": -9007199254740991,
            "warnings": [
              "string"
            ],
            "content_url": "http://example.com",
            "text": "string"
          }
        }
      ]
    }
  ],
  "next_cursor": "string"
}