Skip to content

Latest commit

 

History

History
2737 lines (2019 loc) · 57.5 KB

message.md

File metadata and controls

2737 lines (2019 loc) · 57.5 KB

Message API

Send and receive email messages via your epilot organization

Quick Start

# List available operations
epilot message

# Call an operation
epilot message sendMessage

Common Flags

Flag Description
-p key=value Set a named parameter
-d '{...}' Request body JSON
-H 'Key: Value' Custom header
-t, --token <token> Bearer token for authentication
--profile <name> Use a named profile
-s, --server <url> Override server base URL
-i, --include Include response headers in output
--json Output raw JSON (no formatting)
-v, --verbose Verbose output (show request details)
--jsonata <expr> JSONata expression to transform response
--definition <file> Override OpenAPI spec file/URL
--guided Prompt for all parameters interactively
--no-interactive Disable interactive prompts

Operations

Messages

Threads

Drafts

sendMessage

Send an email message

POST /v1/message/messages

Parameters

Name In Type Required Description
do_not_create_entities query boolean No When true, this flag lets the caller to send only the message and by-pass creating the thread & message entities.

Request Body

Sample Call

epilot message sendMessage \
  -d '{}'

Using stdin pipe:

cat body.json | epilot message sendMessage

With JSONata filter:

epilot message sendMessage --jsonata 'complete_thread'
Sample Response
{}

updateMessage

Update message metadata

PUT /v1/message/messages

Sample Call

epilot message updateMessage

With JSONata filter:

epilot message updateMessage --jsonata '$'
Sample Response
{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
  "sender": "206801",
  "updated_by": "206801",
  "subject": "Request for solar panel price",
  "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
  "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
  "from": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "reply_to": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "to": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "cc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "bcc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "file": {
    "$relation": [
      {
        "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
        "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
        "is_message_attachment": true,
        "may_be_signature_attachment": true,
        "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
        "inline": false,
        "send_as_link": false,
        "save_to_entity": true
      }
    ]
  },
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "user_read_message": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "send_status": ["SEND"],
  "type": "SENT",
  "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
}

getMessage

Get an email message by id

GET /v1/message/messages/{id}

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message getMessage \
  -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb

Using positional args for path parameters:

epilot message getMessage 4d74976d-fb64-47fd-85e2-65eea140f5eb

With JSONata filter:

epilot message getMessage -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$'
Sample Response
{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
  "sender": "206801",
  "updated_by": "206801",
  "subject": "Request for solar panel price",
  "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
  "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
  "from": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "reply_to": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "to": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "cc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "bcc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "file": {
    "$relation": [
      {
        "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
        "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
        "is_message_attachment": true,
        "may_be_signature_attachment": true,
        "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
        "inline": false,
        "send_as_link": false,
        "save_to_entity": true
      }
    ]
  },
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "user_read_message": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "send_status": ["SEND"],
  "type": "SENT",
  "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
}

deleteMessage

Immediately and permanently delete a message. This operation cannot be undone.

DELETE /v1/message/messages/{id}

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message deleteMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message deleteMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message deleteMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

getMessageEml

Download a message as an EML file.

GET /v1/message/messages/{id}/eml

Parameters

Name In Type Required Description
id path string Yes Message entity ID

Sample Call

epilot message getMessageEml \
  -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb

Using positional args for path parameters:

epilot message getMessageEml 4d74976d-fb64-47fd-85e2-65eea140f5eb

With JSONata filter:

epilot message getMessageEml -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$'

searchMessages

Search Messages

POST /v1/message/messages:search

Request Body

Sample Call

epilot message searchMessages

With request body:

epilot message searchMessages \
  -d '{
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "q": "subject:\"Request for solar panel price\" AND _tags:INBOX",
  "view": {
    "folder": "inbox",
    "mailbox": "organization",
    "labels": ["string"],
    "purposes": ["string"],
    "filters": ["unread"],
    "from": ["string"],
    "to": ["string"],
    "assigned_to": ["string"],
    "include_unassigned": true,
    "date_from_days_ago": 0,
    "date_to_days_ago": 0,
    "email_filter": ["string"],
    "text": "string",
    "thread_ids": ["string"],
    "pinned_by": "string"
  },
  "user_groups": ["string"],
  "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"],
  "from": 0,
  "size": 10,
  "hydrate": false,
  "include_scores": false,
  "sort": "string",
  "highlight": {}
}'

Using stdin pipe:

cat body.json | epilot message searchMessages

With JSONata filter:

epilot message searchMessages --jsonata 'results[0]'
Sample Response
{
  "hits": 14,
  "results": [
    {
      "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "_title": "string",
      "_org": "206801",
      "_schema": "message",
      "_tags": ["pricing", "INBOX"],
      "_created_at": "2021-02-09T12:41:43.662Z",
      "_updated_at": "2021-02-10T09:14:31.990Z",
      "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
      "sender": "206801",
      "updated_by": "206801",
      "subject": "Request for solar panel price",
      "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
      "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
      "from": {},
      "reply_to": {},
      "to": [],
      "cc": [],
      "bcc": [],
      "file": {},
      "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
      "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
      "user_read_message": ["206801", "200109"],
      "org_read_message": ["789372", "210291"],
      "send_status": ["SEND"],
      "type": "SENT",
      "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
    }
  ]
}

trashMessage

Move a message to the trash

POST /v1/message/messages/{id}/trash

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message trashMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message trashMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message trashMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

untrashMessage

Restore a trashed message

POST /v1/message/messages/{id}/untrash

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message untrashMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message untrashMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message untrashMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markReadMessage

Mark message as read

POST /v1/message/messages/{id}/read

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message markReadMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markReadMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markReadMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markReadMessageV2

Mark message as read within a scope

POST /v2/message/messages/{id}/read

Parameters

Name In Type Required Description
id path string Yes Message ID

Request Body (required)

Sample Call

epilot message markReadMessageV2 \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"scopes":["organization","user"]}'

Using positional args for path parameters:

epilot message markReadMessageV2 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message markReadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markReadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markUnreadMessage

Mark message as unread

POST /v1/message/messages/{id}/unread

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message markUnreadMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markUnreadMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markUnreadMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

getUnread

Get all unread messages by actor

GET /v1/message/messages/unread/{actor}

Parameters

Name In Type Required Description
actor path "organization" | "user" Yes Actor performing call, can be user or organization
email_filter query string[] | string No emails to filter by

Sample Call

epilot message getUnread \
  -p actor=example

Using positional args for path parameters:

epilot message getUnread example

With JSONata filter:

epilot message getUnread -p actor=example --jsonata 'count'
Sample Response
{
  "count": 14,
  "unread": 0,
  "drafts": 12,
  "unassigned": 1,
  "spam": 3
}

getUnreadCounts

Unread counts for several named scopes in one request.

POST /v1/message/unread:counts

Request Body (required)

Sample Call

epilot message getUnreadCounts

With request body:

epilot message getUnreadCounts \
  -d '{
  "actor": "organization",
  "email_filter": ["string"],
  "user_groups": ["string"],
  "scopes": [
    {
      "name": "inbox-support",
      "type": "organization",
      "q": "_tags.keyword:inbox AND !_tags.keyword:trash",
      "view_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
      "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
    }
  ]
}'

Using stdin pipe:

cat body.json | epilot message getUnreadCounts

With JSONata filter:

epilot message getUnreadCounts --jsonata 'enabled'
Sample Response
{
  "enabled": true,
  "counts": {},
  "omitted": ["string"]
}

markUnreadMessageV2

Mark message as unread within a scope

POST /v2/message/messages/{id}/unread

Parameters

Name In Type Required Description
id path string Yes Message ID

Request Body (required)

Sample Call

epilot message markUnreadMessageV2 \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"scopes":["organization","user"]}'

Using positional args for path parameters:

epilot message markUnreadMessageV2 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message markUnreadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markUnreadMessageV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

searchThreads

Search for threads of email messages.

POST /v1/message/threads:search

Request Body

Sample Call

epilot message searchThreads \
  -d '{"q":"subject:\"Request for solar panel price\" AND _tags:INBOX","from":0,"size":10,"hydrate":false}'

Using stdin pipe:

cat body.json | epilot message searchThreads

With JSONata filter:

epilot message searchThreads --jsonata 'results[0]'
Sample Response
{
  "hits": 14,
  "results": [
    {
      "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "_title": "string",
      "_org": "206801",
      "_schema": "message",
      "_tags": ["pricing", "INBOX"],
      "_created_at": "2021-02-09T12:41:43.662Z",
      "_updated_at": "2021-02-10T09:14:31.990Z",
      "topic": "CUSTOMER_MESSAGE",
      "assigned_to": ["206801", "200109"],
      "org_read_message": ["789372", "210291"],
      "done": false,
      "latest_message": {},
      "latest_trash_message": {},
      "latest_message_at": "2024-02-10T09:14:31.990Z"
    }
  ]
}

searchThreadsV2

Search for threads of email messages.

POST /v2/message/threads:search

Request Body

Sample Call

epilot message searchThreadsV2

With request body:

epilot message searchThreadsV2 \
  -d '{
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "q": "subject:\"Request for solar panel price\" AND _tags:INBOX",
  "view": {
    "folder": "inbox",
    "mailbox": "organization",
    "labels": ["string"],
    "purposes": ["string"],
    "filters": ["unread"],
    "from": ["string"],
    "to": ["string"],
    "assigned_to": ["string"],
    "include_unassigned": true,
    "date_from_days_ago": 0,
    "date_to_days_ago": 0,
    "email_filter": ["string"],
    "text": "string",
    "thread_ids": ["string"],
    "pinned_by": "string"
  },
  "user_groups": ["string"],
  "fields": ["_id", "_title", "first_name", "account", "!account.*._files", "**._product"],
  "from": 0,
  "size": 10,
  "hydrate": false,
  "include_scores": false,
  "sort": "string",
  "highlight": {}
}'

Using stdin pipe:

cat body.json | epilot message searchThreadsV2

With JSONata filter:

epilot message searchThreadsV2 --jsonata 'results[0]'
Sample Response
{
  "hits": 14,
  "results": [
    {
      "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "_title": "string",
      "_org": "206801",
      "_schema": "message",
      "_tags": ["pricing", "INBOX"],
      "_created_at": "2021-02-09T12:41:43.662Z",
      "_updated_at": "2021-02-10T09:14:31.990Z",
      "topic": "CUSTOMER_MESSAGE",
      "assigned_to": ["206801", "200109"],
      "org_read_message": ["789372", "210291"],
      "done": false,
      "latest_message": {},
      "latest_trash_message": {},
      "latest_message_at": "2024-02-10T09:14:31.990Z"
    }
  ]
}

searchIds

Return all thread id's that match a criteria

POST /v1/message/threads:searchIds

Request Body

Sample Call

epilot message searchIds

With request body:

epilot message searchIds \
  -d '{
  "view": {
    "folder": "inbox",
    "mailbox": "organization",
    "labels": ["string"],
    "purposes": ["string"],
    "filters": ["unread"],
    "from": ["string"],
    "to": ["string"],
    "assigned_to": ["string"],
    "include_unassigned": true,
    "date_from_days_ago": 0,
    "date_to_days_ago": 0,
    "email_filter": ["string"],
    "text": "string",
    "thread_ids": ["string"],
    "pinned_by": "string"
  },
  "user_groups": ["string"],
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "q": "subject:\"Request for solar panel price\" AND _tags:INBOX"
}'

Using stdin pipe:

cat body.json | epilot message searchIds

With JSONata filter:

epilot message searchIds --jsonata 'results[0]'
Sample Response
{
  "hits": 14,
  "results": ["string"]
}

getAssigneeWorkload

Return the open-thread workload for a set of user ids.

POST /v2/message/threads:workload

Request Body (required)

Sample Call

epilot message getAssigneeWorkload \
  -d '{"user_ids":["11000902","11001053"]}'

Using stdin pipe:

cat body.json | epilot message getAssigneeWorkload

With JSONata filter:

epilot message getAssigneeWorkload --jsonata 'workloads'
Sample Response
{
  "workloads": [
    {
      "user_id": "11000902",
      "open_threads": 2
    }
  ]
}

updateThread

Modify thread metadata

PUT /v1/message/threads

Sample Call

epilot message updateThread

With JSONata filter:

epilot message updateThread --jsonata '$'
Sample Response
{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "topic": "CUSTOMER_MESSAGE",
  "assigned_to": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "done": false,
  "latest_message": {
    "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
    "sender": "206801",
    "updated_by": "206801",
    "subject": "Request for solar panel price",
    "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
    "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
    "from": {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    },
    "reply_to": {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    },
    "to": [
      {}
    ],
    "cc": [
      {}
    ],
    "bcc": [
      {}
    ],
    "file": {
      "$relation": []
    },
    "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
    "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
    "user_read_message": ["206801", "200109"],
    "org_read_message": ["789372", "210291"],
    "send_status": ["SEND"],
    "type": "SENT",
    "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
  },
  "latest_trash_message": {
    "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
    "sender": "206801",
    "updated_by": "206801",
    "subject": "Request for solar panel price",
    "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
    "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
    "from": {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    },
    "reply_to": {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    },
    "to": [
      {}
    ],
    "cc": [
      {}
    ],
    "bcc": [
      {}
    ],
    "file": {
      "$relation": []
    },
    "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
    "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
    "user_read_message": ["206801", "200109"],
    "org_read_message": ["789372", "210291"],
    "send_status": ["SEND"],
    "type": "SENT",
    "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
  },
  "latest_message_at": "2024-02-10T09:14:31.990Z"
}

deleteThread

Immediately and permanently delete a thread. This operation cannot be undone.

DELETE /v1/message/threads/{id}

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message deleteThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message deleteThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message deleteThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

moveThread

Move thread to a different Inbox

POST /v1/message/threads/{id}:move

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message moveThread \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"inbox_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3"}'

Using positional args for path parameters:

epilot message moveThread 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message moveThread -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message moveThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markThreadAsDone

Mark thread as done

POST /v1/message/threads/{id}:markAsDone

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message markThreadAsDone \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markThreadAsDone 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markThreadAsDone -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markThreadAsOpen

Mark thread as open

POST /v1/message/threads/{id}:markAsOpen

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message markThreadAsOpen \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markThreadAsOpen 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markThreadAsOpen -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

getThreadTimeline

Get thread timeline

GET /v1/message/threads/{id}/timeline

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message getThreadTimeline \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message getThreadTimeline 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message getThreadTimeline -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'events'
Sample Response
{
  "events": [
    {
      "id": "string",
      "data": {
        "type": "THREAD_DONE",
        "user_id": "123",
        "organization_id": "456"
      },
      "timestamp": "2024-01-01T00:00:00.000Z",
      "message_id": "string",
      "source": "user",
      "automated": true,
      "actor": {
        "user_id": "string",
        "email": "string"
      },
      "automation": {
        "id": "string",
        "name": "string"
      }
    }
  ]
}

trashThread

Move a thread to trash

POST /v1/message/threads/{id}/trash

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message trashThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message trashThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message trashThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

untrashThread

Restore a trashed thread

POST /v1/message/threads/{id}/untrash

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message untrashThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message untrashThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message untrashThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

spamThread

Mark a thread as spam

POST /v1/message/threads/{id}/spam

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message spamThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message spamThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message spamThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

unspamThread

Remove spam marking from a thread

POST /v1/message/threads/{id}/unspam

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message unspamThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message unspamThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message unspamThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

spamMessage

Mark a single message as spam. Also marks the parent thread as spam if all messages in the thread are spam.

POST /v1/message/messages/{id}/spam

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message spamMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message spamMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message spamMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

unspamMessage

Remove spam marking from a single message. Also removes spam from the parent thread if no other messages are spam.

POST /v1/message/messages/{id}/unspam

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message unspamMessage \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message unspamMessage 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message unspamMessage -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

bulkMoveThreads

Move many threads to a different inbox

POST /v1/message/threads/bulk:move

Request Body (required)

Sample Call

epilot message bulkMoveThreads

With request body:

epilot message bulkMoveThreads \
  -d '{
  "ids": ["6b299eda-4018-4554-8965-c4b5598e6531"],
  "assign_to": ["206801"],
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "scopes": ["organization", "user"]
}'

Using stdin pipe:

cat body.json | epilot message bulkMoveThreads

With JSONata filter:

epilot message bulkMoveThreads --jsonata '$'

bulkAssignThreads

Assign many threads

POST /v1/message/threads/bulk:assign

Request Body (required)

Sample Call

epilot message bulkAssignThreads

With request body:

epilot message bulkAssignThreads \
  -d '{
  "ids": ["6b299eda-4018-4554-8965-c4b5598e6531"],
  "assign_to": ["206801"],
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "scopes": ["organization", "user"]
}'

Using stdin pipe:

cat body.json | epilot message bulkAssignThreads

With JSONata filter:

epilot message bulkAssignThreads --jsonata '$'

threadBulkActionsRead

Perform a bulk action of marking an array of thread ids as read

POST /v1/message/threads/bulk:read

Request Body (required)

Sample Call

epilot message threadBulkActionsRead

With request body:

epilot message threadBulkActionsRead \
  -d '{
  "ids": ["6b299eda-4018-4554-8965-c4b5598e6531"],
  "assign_to": ["206801"],
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "scopes": ["organization", "user"]
}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsRead

With JSONata filter:

epilot message threadBulkActionsRead --jsonata '$'

threadBulkActionsUnread

Perform a bulk action of marking an array of thread ids as unread

POST /v1/message/threads/bulk:unread

Request Body (required)

Sample Call

epilot message threadBulkActionsUnread

With request body:

epilot message threadBulkActionsUnread \
  -d '{
  "ids": ["6b299eda-4018-4554-8965-c4b5598e6531"],
  "assign_to": ["206801"],
  "inbox_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3",
  "scopes": ["organization", "user"]
}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsUnread

With JSONata filter:

epilot message threadBulkActionsUnread --jsonata '$'

threadBulkActionsFavorite

Perform a bulk action of marking an array of thread ids favorite

POST /v1/message/threads/bulk:favorite

Request Body (required)

Sample Call

epilot message threadBulkActionsFavorite \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsFavorite

With JSONata filter:

epilot message threadBulkActionsFavorite --jsonata '$'

threadBulkActionsUnfavorite

Perform a bulk action of marking an array of thread ids unfavorited

POST /v1/message/threads/bulk:unfavorite

Request Body (required)

Sample Call

epilot message threadBulkActionsUnfavorite \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsUnfavorite

With JSONata filter:

epilot message threadBulkActionsUnfavorite --jsonata '$'

threadBulkActionsTrash

Perform a bulk action of trashing an array of threads

POST /v1/message/threads/bulk:trash

Request Body (required)

Sample Call

epilot message threadBulkActionsTrash \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsTrash

With JSONata filter:

epilot message threadBulkActionsTrash --jsonata '$'

threadBulkActionsUntrash

Perform a bulk action of untrashing an array of threads

POST /v1/message/threads/bulk:untrash

Request Body (required)

Sample Call

epilot message threadBulkActionsUntrash \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsUntrash

With JSONata filter:

epilot message threadBulkActionsUntrash --jsonata '$'

threadBulkActionsDelete

Performs a bulk permanent delete for all threads

POST /v1/message/threads/bulk:delete

Request Body (required)

Sample Call

epilot message threadBulkActionsDelete \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsDelete

With JSONata filter:

epilot message threadBulkActionsDelete --jsonata '$'

threadBulkActionsDone

Perform a bulk action of marking an array of threads as done

POST /v1/message/threads/bulk:done

Request Body (required)

Sample Call

epilot message threadBulkActionsDone \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsDone

With JSONata filter:

epilot message threadBulkActionsDone --jsonata '$'

threadBulkActionsOpen

Perform a bulk action of marking an array of threads as open

POST /v1/message/threads/bulk:open

Request Body (required)

Sample Call

epilot message threadBulkActionsOpen \
  -d '{"ids":["6b299eda-4018-4554-8965-c4b5598e6531"]}'

Using stdin pipe:

cat body.json | epilot message threadBulkActionsOpen

With JSONata filter:

epilot message threadBulkActionsOpen --jsonata '$'

markReadThread

Mark thread as read

POST /v1/message/threads/{id}/read

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message markReadThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markReadThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markReadThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markReadThreadV2

Mark thread as read within a scope

POST /v2/message/threads/{id}/read

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message markReadThreadV2 \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"scopes":["organization","user"]}'

Using positional args for path parameters:

epilot message markReadThreadV2 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message markReadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markReadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markUnreadThread

Mark thread as unread

POST /v1/message/threads/{id}/unread

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message markUnreadThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message markUnreadThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markUnreadThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

markUnreadThreadV2

Mark thread as unread within a scope

POST /v2/message/threads/{id}/unread

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message markUnreadThreadV2 \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"scopes":["organization","user"]}'

Using positional args for path parameters:

epilot message markUnreadThreadV2 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message markUnreadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message markUnreadThreadV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

assignThread

Assign thread to entities

POST /v1/message/threads/{id}/assign

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message assignThread \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '[{"slug":"contact","entity_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3","org_id":"206801","is_main_entity":true}]'

Using positional args for path parameters:

epilot message assignThread 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message assignThread -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message assignThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

unassignThread

Unassign thread from entities

POST /v1/message/threads/{id}/unassign

Parameters

Name In Type Required Description
id path string Yes Thread ID
unlink_mapped_entities query boolean No When true, also removes unassigned entities from mapped_entities on related source entities

Request Body (required)

Sample Call

epilot message unassignThread \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '[{"slug":"contact","entity_id":"3f34ce73-089c-4d45-a5ee-c161234e41c3"}]'

Using positional args for path parameters:

epilot message unassignThread 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message unassignThread -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message unassignThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

assignUsers

Assign users to thread for receiving notifications.

POST /v1/message/threads/{id}/assign:users

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message assignUsers \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"assigned_to":["206801"]}'

Using positional args for path parameters:

epilot message assignUsers 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message assignUsers -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message assignUsers -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

assignUsersV2

Assign users to thread.

POST /v2/message/threads/{id}/assign:users

Parameters

Name In Type Required Description
id path string Yes Thread ID

Request Body (required)

Sample Call

epilot message assignUsersV2 \
  -p id=123e4567-e89b-12d3-a456-426614174000 \
  -d '{"add":["206801"],"remove":["206801"]}'

Using positional args for path parameters:

epilot message assignUsersV2 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot message assignUsersV2 -p id=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message assignUsersV2 -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

pinThread

Pin a single thread

POST /v1/message/threads/{id}:pin

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message pinThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message pinThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message pinThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

unpinThread

Unpin a single thread

DELETE /v1/message/threads/{id}:pin

Parameters

Name In Type Required Description
id path string Yes Thread ID

Sample Call

epilot message unpinThread \
  -p id=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot message unpinThread 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot message unpinThread -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'

createDraft

Create a new draft

POST /v1/message/drafts

Request Body

Sample Call

epilot message createDraft \
  -d '{}'

Using stdin pipe:

cat body.json | epilot message createDraft

With JSONata filter:

epilot message createDraft --jsonata '$'
Sample Response
{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
  "sender": "206801",
  "updated_by": "206801",
  "subject": "Request for solar panel price",
  "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
  "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
  "from": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "reply_to": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "to": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "cc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "bcc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "file": {
    "$relation": [
      {
        "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
        "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
        "is_message_attachment": true,
        "may_be_signature_attachment": true,
        "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
        "inline": false,
        "send_as_link": false,
        "save_to_entity": true
      }
    ]
  },
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "user_read_message": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "send_status": ["SEND"],
  "type": "SENT",
  "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
}

sendDraft

Send the existing draft to the recipients

POST /v1/message/drafts:send

Sample Call

epilot message sendDraft

With JSONata filter:

epilot message sendDraft --jsonata '$'
Sample Response
{
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
  "sender": "206801",
  "updated_by": "206801",
  "subject": "Request for solar panel price",
  "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
  "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
  "from": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "reply_to": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "to": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "cc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "bcc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "file": {
    "$relation": [
      {
        "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
        "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
        "is_message_attachment": true,
        "may_be_signature_attachment": true,
        "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
        "inline": false,
        "send_as_link": false,
        "save_to_entity": true
      }
    ]
  },
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "user_read_message": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "send_status": ["SEND"],
  "type": "SENT",
  "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
}

getMessageV2

  • Fetches message by ID

GET /v2/message/messages/{id}

Parameters

Name In Type Required Description
id path string Yes Message ID

Sample Call

epilot message getMessageV2 \
  -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb

Using positional args for path parameters:

epilot message getMessageV2 4d74976d-fb64-47fd-85e2-65eea140f5eb

With JSONata filter:

epilot message getMessageV2 -p id=4d74976d-fb64-47fd-85e2-65eea140f5eb --jsonata '$'
Sample Response
{
  "html_omitted": false,
  "html_download_url": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html",
  "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "_title": "string",
  "_org": "206801",
  "_schema": "message",
  "_tags": ["pricing", "INBOX"],
  "_created_at": "2021-02-09T12:41:43.662Z",
  "_updated_at": "2021-02-10T09:14:31.990Z",
  "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",
  "sender": "206801",
  "updated_by": "206801",
  "subject": "Request for solar panel price",
  "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",
  "text": "We at ABC GmbH would like to request a price quote for the solar panel.",
  "from": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "reply_to": {
    "name": "epilot",
    "address": "messaging@epilot.cloud",
    "email_type": "INTERNAL",
    "send_status": "SEND",
    "send_error": {}
  },
  "to": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "cc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "bcc": [
    {
      "name": "epilot",
      "address": "messaging@epilot.cloud",
      "email_type": "INTERNAL",
      "send_status": "SEND",
      "send_error": {}
    }
  ],
  "file": {
    "$relation": [
      {
        "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
        "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
        "is_message_attachment": true,
        "may_be_signature_attachment": true,
        "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",
        "inline": false,
        "send_as_link": false,
        "save_to_entity": true
      }
    ]
  },
  "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",
  "user_read_message": ["206801", "200109"],
  "org_read_message": ["789372", "210291"],
  "send_status": ["SEND"],
  "type": "SENT",
  "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
}