Skip to main content
POST
Send Message
Sends a new email from one inbox and returns message_id and thread_id. Takes to, cc, bcc, subject, text, html, labels and attachments. 🔴 This sends real email and it cannot be recalled. Every AIsa caller shares one AgentMail account, so this reaches inboxes other callers created, so the sending address may not be one you created — check get_agentmail_inbox first. To answer an existing message use post_agentmail_inbox_message_reply; to write without sending, post_agentmail_inbox_draft.

Example

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.

Body

application/json
labels
string[]

Labels of message.

reply_to

Reply-to address or addresses.

to

Recipient address or addresses.

cc

CC recipient address or addresses.

bcc

BCC recipient address or addresses.

subject
string

Subject of message.

text
string

Plain text body of message.

html
string

HTML body of message.

attachments
SendAttachment · object[]

Attachments to include in message.

headers
SendMessageHeaders · object

Headers to include in message.

Response

Response with status 200

message_id
string
required

ID of message.

thread_id
string
required

ID of thread.