Reply to a thread
curl --request POST \
--url https://api.emailr.dev/v1/threads/{threadId}/reply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"html": "<p>Thanks for reaching out!</p>",
"text": "Thanks for reaching out!",
"to": "jsmith@example.com",
"cc": "jsmith@example.com",
"bcc": "jsmith@example.com",
"from": "<string>",
"from_name": "<string>",
"reply_to_email": "jsmith@example.com",
"attachments": [
{
"filename": "<string>",
"content": "<string>",
"contentType": "<string>"
}
]
}
'import requests
url = "https://api.emailr.dev/v1/threads/{threadId}/reply"
payload = {
"html": "<p>Thanks for reaching out!</p>",
"text": "Thanks for reaching out!",
"to": "jsmith@example.com",
"cc": "jsmith@example.com",
"bcc": "jsmith@example.com",
"from": "<string>",
"from_name": "<string>",
"reply_to_email": "jsmith@example.com",
"attachments": [
{
"filename": "<string>",
"content": "<string>",
"contentType": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
html: '<p>Thanks for reaching out!</p>',
text: 'Thanks for reaching out!',
to: 'jsmith@example.com',
cc: 'jsmith@example.com',
bcc: 'jsmith@example.com',
from: '<string>',
from_name: '<string>',
reply_to_email: 'jsmith@example.com',
attachments: [{filename: '<string>', content: '<string>', contentType: '<string>'}]
})
};
fetch('https://api.emailr.dev/v1/threads/{threadId}/reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.emailr.dev/v1/threads/{threadId}/reply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'html' => '<p>Thanks for reaching out!</p>',
'text' => 'Thanks for reaching out!',
'to' => 'jsmith@example.com',
'cc' => 'jsmith@example.com',
'bcc' => 'jsmith@example.com',
'from' => '<string>',
'from_name' => '<string>',
'reply_to_email' => 'jsmith@example.com',
'attachments' => [
[
'filename' => '<string>',
'content' => '<string>',
'contentType' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emailr.dev/v1/threads/{threadId}/reply"
payload := strings.NewReader("{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.emailr.dev/v1/threads/{threadId}/reply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emailr.dev/v1/threads/{threadId}/reply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "<string>",
"recipients": 123,
"status": "<string>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}threads
Reply to a thread
Send a reply to a thread. From, from_name, reply_to, to, and subject are auto-resolved from the thread’s inbox if not provided.
POST
/
v1
/
threads
/
{threadId}
/
reply
Reply to a thread
curl --request POST \
--url https://api.emailr.dev/v1/threads/{threadId}/reply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"html": "<p>Thanks for reaching out!</p>",
"text": "Thanks for reaching out!",
"to": "jsmith@example.com",
"cc": "jsmith@example.com",
"bcc": "jsmith@example.com",
"from": "<string>",
"from_name": "<string>",
"reply_to_email": "jsmith@example.com",
"attachments": [
{
"filename": "<string>",
"content": "<string>",
"contentType": "<string>"
}
]
}
'import requests
url = "https://api.emailr.dev/v1/threads/{threadId}/reply"
payload = {
"html": "<p>Thanks for reaching out!</p>",
"text": "Thanks for reaching out!",
"to": "jsmith@example.com",
"cc": "jsmith@example.com",
"bcc": "jsmith@example.com",
"from": "<string>",
"from_name": "<string>",
"reply_to_email": "jsmith@example.com",
"attachments": [
{
"filename": "<string>",
"content": "<string>",
"contentType": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
html: '<p>Thanks for reaching out!</p>',
text: 'Thanks for reaching out!',
to: 'jsmith@example.com',
cc: 'jsmith@example.com',
bcc: 'jsmith@example.com',
from: '<string>',
from_name: '<string>',
reply_to_email: 'jsmith@example.com',
attachments: [{filename: '<string>', content: '<string>', contentType: '<string>'}]
})
};
fetch('https://api.emailr.dev/v1/threads/{threadId}/reply', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.emailr.dev/v1/threads/{threadId}/reply",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'html' => '<p>Thanks for reaching out!</p>',
'text' => 'Thanks for reaching out!',
'to' => 'jsmith@example.com',
'cc' => 'jsmith@example.com',
'bcc' => 'jsmith@example.com',
'from' => '<string>',
'from_name' => '<string>',
'reply_to_email' => 'jsmith@example.com',
'attachments' => [
[
'filename' => '<string>',
'content' => '<string>',
'contentType' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.emailr.dev/v1/threads/{threadId}/reply"
payload := strings.NewReader("{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.emailr.dev/v1/threads/{threadId}/reply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.emailr.dev/v1/threads/{threadId}/reply")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"html\": \"<p>Thanks for reaching out!</p>\",\n \"text\": \"Thanks for reaching out!\",\n \"to\": \"jsmith@example.com\",\n \"cc\": \"jsmith@example.com\",\n \"bcc\": \"jsmith@example.com\",\n \"from\": \"<string>\",\n \"from_name\": \"<string>\",\n \"reply_to_email\": \"jsmith@example.com\",\n \"attachments\": [\n {\n \"filename\": \"<string>\",\n \"content\": \"<string>\",\n \"contentType\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message_id": "<string>",
"recipients": 123,
"status": "<string>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}{
"error": "An error occurred",
"code": "VALIDATION_ERROR",
"details": "<unknown>"
}Authorizations
API key authentication. Use your API key as the bearer token.
Path Parameters
Body
application/json
Example:
"<p>Thanks for reaching out!</p>"
Example:
"Thanks for reaching out!"
Override recipient. Auto-resolved from last received message if omitted.
Override sender. Auto-resolved from thread inbox if omitted.
Override sender display name. Auto-resolved from inbox name if omitted.
Override Reply-To. Auto-resolved from inbox inbound address if omitted.
Show child attributes
Show child attributes
⌘I