Sends a reply to an inbound email message. The reply is threaded into the original conversation via In-Reply-To and References headers, and queued through the standard sending pipeline. The from domain must be a verified sending domain on the project.
POST
/
inbound
/
messages
/
{id}
/
reply
curl --request POST \ --url https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply \ --header 'Authorization: Bearer as_your-api-key' \ --header 'Content-Type: application/json' \ --data '{ "from": { "email": "[email protected]", "name": "Support Team" }, "subject": "Re: Question about my order", "html": "<p>Hi Jane, your order #4821 shipped today.</p>", "text": "Hi Jane, your order #4821 shipped today."}'
import requestsurl = "https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply"headers = { "Authorization": "Bearer as_your-api-key", "Content-Type": "application/json"}payload = { "from": {"email": "[email protected]", "name": "Support Team"}, "subject": "Re: Question about my order", "html": "<p>Hi Jane, your order #4821 shipped today.</p>", "text": "Hi Jane, your order #4821 shipped today."}response = requests.post(url, json=payload, headers=headers)print(response.json())
fetch('https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply', { method: 'POST', headers: { 'Authorization': 'Bearer as_your-api-key', 'Content-Type': 'application/json' }, body: JSON.stringify({ from: { email: '[email protected]', name: 'Support Team' }, subject: 'Re: Question about my order', html: '<p>Hi Jane, your order #4821 shipped today.</p>', text: 'Hi Jane, your order #4821 shipped today.' })}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
<?php$messageId = '60d5ec49f1b2c72d9c8b1234';$url = "https://api.autosend.com/v1/inbound/messages/{$messageId}/reply";$data = [ 'from' => ['email' => '[email protected]', 'name' => 'Support Team'], 'subject' => 'Re: Question about my order', 'html' => '<p>Hi Jane, your order #4821 shipped today.</p>', 'text' => 'Hi Jane, your order #4821 shipped today.'];$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer as_your-api-key', 'Content-Type: application/json']);$response = curl_exec($ch);curl_close($ch);echo $response;?>
This endpoint uses a standard project API key (AS_ prefix). The reply is threaded into the original conversation (via In-Reply-To and References) and queued through the standard sending pipeline. The response returns 202 Accepted.
The from.email domain must be a verified sending domain on the project.
curl --request POST \ --url https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply \ --header 'Authorization: Bearer as_your-api-key' \ --header 'Content-Type: application/json' \ --data '{ "from": { "email": "[email protected]", "name": "Support Team" }, "subject": "Re: Question about my order", "html": "<p>Hi Jane, your order #4821 shipped today.</p>", "text": "Hi Jane, your order #4821 shipped today."}'
import requestsurl = "https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply"headers = { "Authorization": "Bearer as_your-api-key", "Content-Type": "application/json"}payload = { "from": {"email": "[email protected]", "name": "Support Team"}, "subject": "Re: Question about my order", "html": "<p>Hi Jane, your order #4821 shipped today.</p>", "text": "Hi Jane, your order #4821 shipped today."}response = requests.post(url, json=payload, headers=headers)print(response.json())
fetch('https://api.autosend.com/v1/inbound/messages/60d5ec49f1b2c72d9c8b1234/reply', { method: 'POST', headers: { 'Authorization': 'Bearer as_your-api-key', 'Content-Type': 'application/json' }, body: JSON.stringify({ from: { email: '[email protected]', name: 'Support Team' }, subject: 'Re: Question about my order', html: '<p>Hi Jane, your order #4821 shipped today.</p>', text: 'Hi Jane, your order #4821 shipped today.' })}) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));
<?php$messageId = '60d5ec49f1b2c72d9c8b1234';$url = "https://api.autosend.com/v1/inbound/messages/{$messageId}/reply";$data = [ 'from' => ['email' => '[email protected]', 'name' => 'Support Team'], 'subject' => 'Re: Question about my order', 'html' => '<p>Hi Jane, your order #4821 shipped today.</p>', 'text' => 'Hi Jane, your order #4821 shipped today.'];$ch = curl_init($url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer as_your-api-key', 'Content-Type: application/json']);$response = curl_exec($ch);curl_close($ch);echo $response;?>
Sender display name. Falls back to the project’s sender name when omitted.Maximum length: 256Example: "Support Team"
string
Subject line for the reply. When omitted, defaults to the original subject prefixed with Re: (no double prefixing).Minimum length: 1Maximum length: 998Example: "Re: Question about my order"
string
HTML body of the reply.
string
Plain-text body of the reply.
object[]
CC recipients. Each entry has a required email and optional name.Maximum items: 50
object[]
BCC recipients. Each entry has a required email and optional name.Maximum items: 50
object[]
Attachments to include on the reply. Provide each attachment either inline (base64 content) or by fileUrl.Maximum items: 20