Messages

View as Markdown

List Messages

GET
/agent/v0/messages

Query Parameters

inbox_id?string

When set, list messages only for this inbox.

limit?integer

Limit of number of items returned.

page_token?string

Page token for pagination.

labels?array<>

Labels to filter by.

before?string

Timestamp before which to filter by.

Formatdate-time
after?string

Timestamp after which to filter by.

Formatdate-time
ascending?boolean

Sort in ascending temporal order.

include_spam?boolean

Include spam in results.

include_blocked?boolean

Include blocked in results.

include_trash?boolean

Include trash in results.

Header Parameters

Authorization*string

Bearer authentication

Response Body

application/json

application/json

curl -X GET "https://api.agentry.to/agent/v0/messages" \  -H "Authorization: string"
{
  "count": 0,
  "limit": 0,
  "next_page_token": "string",
  "messages": [
    {
      "inbox_id": "string",
      "thread_id": "string",
      "message_id": "string",
      "labels": [
        "string"
      ],
      "timestamp": "2019-08-24T14:15:22Z",
      "from": "string",
      "to": [
        "string"
      ],
      "cc": [
        "string"
      ],
      "bcc": [
        "string"
      ],
      "subject": "string",
      "preview": "string",
      "attachments": [
        {
          "attachment_id": "string",
          "filename": "string",
          "size": 0,
          "content_type": "string",
          "content_disposition": "inline",
          "content_id": "string"
        }
      ],
      "in_reply_to": "string",
      "references": [
        "string"
      ],
      "headers": {
        "property1": "string",
        "property2": "string"
      },
      "size": 0,
      "updated_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "name": "string",
  "message": "string"
}

Get Message

GET
/agent/v0/messages/{message_id}

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Response Body

application/json

application/json

curl -X GET "https://api.agentry.to/agent/v0/messages/string" \  -H "Authorization: string"
{
  "inbox_id": "string",
  "thread_id": "string",
  "message_id": "string",
  "labels": [
    "string"
  ],
  "timestamp": "2019-08-24T14:15:22Z",
  "from": "string",
  "reply_to": [
    "string"
  ],
  "to": [
    "string"
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "subject": "string",
  "preview": "string",
  "text": "string",
  "html": "string",
  "extracted_text": "string",
  "extracted_html": "string",
  "attachments": [
    {
      "attachment_id": "string",
      "filename": "string",
      "size": 0,
      "content_type": "string",
      "content_disposition": "inline",
      "content_id": "string"
    }
  ],
  "in_reply_to": "string",
  "references": [
    "string"
  ],
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "size": 0,
  "updated_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "name": "string",
  "message": "string"
}

Update Message

PATCH
/agent/v0/messages/{message_id}

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://api.agentry.to/agent/v0/messages/string" \  -H "Authorization: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "inbox_id": "string",
  "thread_id": "string",
  "message_id": "string",
  "labels": [
    "string"
  ],
  "timestamp": "2019-08-24T14:15:22Z",
  "from": "string",
  "reply_to": [
    "string"
  ],
  "to": [
    "string"
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "subject": "string",
  "preview": "string",
  "text": "string",
  "html": "string",
  "extracted_text": "string",
  "extracted_html": "string",
  "attachments": [
    {
      "attachment_id": "string",
      "filename": "string",
      "size": 0,
      "content_type": "string",
      "content_disposition": "inline",
      "content_id": "string"
    }
  ],
  "in_reply_to": "string",
  "references": [
    "string"
  ],
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "size": 0,
  "updated_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "name": "string",
  "message": "string"
}

Get Message Attachment

GET
/agent/v0/messages/{message_id}/attachments/{attachment_id}

Path Parameters

message_id*string

ID of message.

attachment_id*string

ID of attachment.

Header Parameters

Authorization*string

Bearer authentication

Response Body

application/json

application/json

curl -X GET "https://api.agentry.to/agent/v0/messages/string/attachments/string" \  -H "Authorization: string"
{
  "attachment_id": "string",
  "filename": "string",
  "size": 0,
  "content_type": "string",
  "content_disposition": "inline",
  "content_id": "string",
  "download_url": "string",
  "expires_at": "2019-08-24T14:15:22Z"
}
{
  "name": "string",
  "message": "string"
}

Get Message Raw

GET
/agent/v0/messages/{message_id}/raw

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Response Body

application/json

application/json

curl -X GET "https://api.agentry.to/agent/v0/messages/string/raw" \  -H "Authorization: string"
{
  "message_id": "string",
  "size": 0,
  "download_url": "string",
  "expires_at": "2019-08-24T14:15:22Z"
}
{
  "name": "string",
  "message": "string"
}

Forward Message

POST
/agent/v0/messages/{message_id}/forward

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.agentry.to/agent/v0/messages/string/forward" \  -H "Authorization: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message_id": "string",
  "thread_id": "string"
}
{
  "name": "string",
  "errors": null
}
{
  "name": "string",
  "message": "string"
}
{
  "name": "string",
  "message": "string"
}

Reply to Message

POST
/agent/v0/messages/{message_id}/reply

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.agentry.to/agent/v0/messages/string/reply" \  -H "Authorization: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message_id": "string",
  "thread_id": "string"
}
{
  "name": "string",
  "errors": null
}
{
  "name": "string",
  "message": "string"
}
{
  "name": "string",
  "message": "string"
}

Reply All to Message

POST
/agent/v0/messages/{message_id}/reply-all

Path Parameters

message_id*string

ID of message.

Header Parameters

Authorization*string

Bearer authentication

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.agentry.to/agent/v0/messages/string/reply-all" \  -H "Authorization: string" \  -H "Content-Type: application/json" \  -d '{}'
{
  "message_id": "string",
  "thread_id": "string"
}
{
  "name": "string",
  "errors": null
}
{
  "name": "string",
  "message": "string"
}
{
  "name": "string",
  "message": "string"
}