Reply To Message
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":[]}'const response = await fetch("https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/reply", { method: "POST", headers: { Authorization: `Bearer ${process.env.YOAGENT_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "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": [] }),});if (!response.ok) throw new Error(await response.text());const data = await response.json();import os
import requests
response = requests.post( "https://api.yoagent.dev/v0/inboxes/inb_01je56wqswfmn9pgbc1wq8tjgq/messages/msg_01je56wqswfmn9pgbc1wq8tjgq/reply", headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"}, json={ "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": [], }, timeout=60,)response.raise_for_status()data = response.json()Reply to a message of the inbox, in its thread, to whoever it came from (message_send and
message_read there).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Inbox id (inb_…), address or *@domain (the catch-all)
Header Parameters
Section titled “Header Parameters”Send at most once: the same key with the same request answers the message sent before
Request Bodyrequired
Section titled “Request Bodyrequired”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
Labels of the sent copy (system labels are refused).
Files to attach.
A file to attach, its bytes in base64.
object
Its media type.
attachment: a file of the message; inline: shown in its HTML (content_id).
The file’s bytes, in base64.
Responses
Section titled “Responses”Successful Response
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
Example
{ "message_id": "msg_01je56wqswfmn9pgbc1wq8tjgq", "thread_id": "thr_01je56wqswfmn9pgbc1wq8tjgq"}default
Section titled “default”An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: Errors.