Skip to content

Reply To Message

POST
/v0/inboxes/{inbox_id}/messages/{message_id}/reply
curl -s -X POST "https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/reply" \
-H "Authorization: Bearer $YOAGENT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Your sign-in code is 482913.","html":"<p>Your sign-in code is <b>482913</b>. Or <a href=\"https://example.com/sign-in?code=482913\">Sign in</a>.</p>","labels":[],"attachments":[]}'

Reply to a message of the inbox, in its thread, to whoever it came from (message_send and message_read there).

inbox_id
required
Inbox Id

Inbox id (inb_…), address or *@domain (the catch-all)

string
message_id
required
Message Id
string
/^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$/
Idempotency-Key
Idempotency-Key
string
>= 1 characters <= 255 characters

Send at most once: the same key with the same request answers the message sent before

Media typeapplication/json
MessageReply

A reply to a message of the inbox, in its thread: to its sender (reply_to or from), with reply-all also to its other recipients; the subject is the parent’s with Re:.

object
text
Text

The plain-text body.

Any of:
string
<= 10485760 characters
html
Html

The HTML body.

Any of:
string
<= 10485760 characters
labels
Labels

Labels of the sent copy (system labels are refused).

Array<string>
default: <= 20 items
attachments
Attachments

Files to attach.

Array<object>
default: <= 50 items
AttachmentIn

A file to attach, its bytes in base64.

object
filename
Filename

The file’s name, as the recipient sees it.

Any of:
string
>= 1 characters <= 998 characters
content_type
Content Type

Its media type.

string
default: application/octet-stream <= 255 characters /^[a-z0-9!#$&^_.+-]+/[a-z0-9!#$&^_.+-]+$/
content_disposition
Content Disposition

attachment: a file of the message; inline: shown in its HTML (content_id).

string
default: attachment
Allowed values: attachment inline
content_id
Content Id

For inline: the id the HTML names it by (cid:<content_id>).

Any of:
string
>= 1 characters <= 998 characters
content
required
Content

The file’s bytes, in base64.

string format: base64

Successful Response

Media typeapplication/json
MessageSent

A sent message: its copy in the inbox and its thread. Delivery goes on after the answer (message.sent, message.delivered and the rest).

object
message_id
required
Message Id
string
/^msg_[0-7][0-9a-hjkmnp-tv-z]{25}$/
thread_id
required
Thread Id
string
/^thr_[0-7][0-9a-hjkmnp-tv-z]{25}$/

Example

{
"message_id": "msg_01je56wqswfmn9pgbc1wq8tjgq",
"thread_id": "thr_01je56wqswfmn9pgbc1wq8tjgq"
}

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.