Skip to main content
GET
https://api.aisa.one/apis/v1
/
agentmail
/
inboxes
/
{inbox_id}
/
threads
/
{thread_id}
Get Thread
curl --request GET \
  --url https://api.aisa.one/apis/v1/agentmail/inboxes/{inbox_id}/threads/{thread_id} \
  --header 'Authorization: Bearer <token>'
{
  "inbox_id": "<string>",
  "thread_id": "<string>",
  "labels": [
    "<string>"
  ],
  "timestamp": "2023-11-07T05:31:56Z",
  "senders": [
    "<string>"
  ],
  "recipients": [
    "<string>"
  ],
  "last_message_id": "<string>",
  "message_count": 123,
  "size": 123,
  "updated_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "messages": [
    {
      "inbox_id": "<string>",
      "thread_id": "<string>",
      "message_id": "<string>",
      "labels": [
        "<string>"
      ],
      "timestamp": "2023-11-07T05:31:56Z",
      "from": "<string>",
      "to": [
        "<string>"
      ],
      "size": 123,
      "updated_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "reply_to": [
        "<string>"
      ],
      "cc": [
        "<string>"
      ],
      "bcc": [
        "<string>"
      ],
      "subject": "<string>",
      "preview": "<string>",
      "text": "<string>",
      "html": "<string>",
      "extracted_text": "<string>",
      "extracted_html": "<string>",
      "attachments": [
        {
          "attachment_id": "<string>",
          "size": 123,
          "filename": "<string>",
          "content_type": "<string>",
          "content_id": "<string>"
        }
      ],
      "in_reply_to": "<string>",
      "references": [
        "<string>"
      ],
      "headers": {}
    }
  ],
  "received_timestamp": "2023-11-07T05:31:56Z",
  "sent_timestamp": "2023-11-07T05:31:56Z",
  "subject": "<string>",
  "preview": "<string>",
  "attachments": [
    {
      "attachment_id": "<string>",
      "size": 123,
      "filename": "<string>",
      "content_type": "<string>",
      "content_id": "<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.

thread_id
string
required

ID of thread.

Response

Response with status 200

inbox_id
string
required

The ID of the inbox.

thread_id
string
required

ID of thread.

labels
string[]
required

Labels of thread.

timestamp
string<date-time>
required

Timestamp of last sent or received message.

senders
string[]
required

Senders in thread. In format username@domain.com or Display Name <username@domain.com>.

recipients
string[]
required

Recipients in thread. In format username@domain.com or Display Name <username@domain.com>.

last_message_id
string
required

ID of last message in thread.

message_count
integer
required

Number of messages in thread.

size
integer
required

Size of thread in bytes.

updated_at
string<date-time>
required

Time at which thread was last updated.

created_at
string<date-time>
required

Time at which thread was created.

messages
Message · object[]
required

Messages in thread. Ordered by timestamp ascending.

received_timestamp
string<date-time>

Timestamp of last received message.

sent_timestamp
string<date-time>

Timestamp of last sent message.

subject
string

Subject of thread.

preview
string

Text preview of last message in thread.

attachments
Attachment · object[]

Attachments in thread.