Skip to main content
GET
https://api.aisa.one/apis/v1
/
agentmail
/
inboxes
/
{inbox_id}
/
drafts
List Drafts
curl --request GET \
  --url https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/drafts \
  --header 'Authorization: Bearer <token>'
{
  "count": 123,
  "drafts": [
    {
      "inbox_id": "<string>",
      "draft_id": "<string>",
      "labels": [
        "<string>"
      ],
      "updated_at": "2023-11-07T05:31:56Z",
      "to": [
        "<string>"
      ],
      "cc": [
        "<string>"
      ],
      "bcc": [
        "<string>"
      ],
      "subject": "<string>",
      "preview": "<string>",
      "attachments": [
        {
          "attachment_id": "<string>",
          "size": 123,
          "filename": "<string>",
          "content_type": "<string>",
          "content_id": "<string>"
        }
      ],
      "in_reply_to": "<string>",
      "send_at": "2023-11-07T05:31:56Z"
    }
  ],
  "limit": 123,
  "next_page_token": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer authentication

Path Parameters

inbox_id
string
required

The ID of the inbox.

Query Parameters

limit
integer

Limit of number of items returned.

page_token
string

Page token for pagination.

labels
string[]

Labels to filter by.

before
string<date-time>

Timestamp before which to filter by.

after
string<date-time>

Timestamp after which to filter by.

ascending
boolean

Sort in ascending temporal order.

Response

Response with status 200

count
integer
required

Number of items returned.

drafts
DraftItem · object[]
required

Ordered by updated_at descending.

limit
integer

Limit of number of items returned.

next_page_token
string

Page token for pagination.