Create Email Address
Create an address on a verified domain. Returns 400 if the domain has not been added and verified first, or if the address is already in use.
curl --request POST \
--url https://api.anyreach.ai/core/email-addresses \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"provider": "resend",
"agent_id": "<string>",
"inbound_agent_version_id": "<string>",
"outbound_from_address": "<string>",
"enabled": true,
"handler": "agent",
"handler_config": {
"include_phone_number": false,
"instructions": "<string>",
"from_display_name": "<string>",
"signature": "<string>",
"reply_to_all": true,
"ignore_senders": [
"<string>"
]
}
}
'import requests
url = "https://api.anyreach.ai/core/email-addresses"
payload = {
"address": "<string>",
"provider": "resend",
"agent_id": "<string>",
"inbound_agent_version_id": "<string>",
"outbound_from_address": "<string>",
"enabled": True,
"handler": "agent",
"handler_config": {
"include_phone_number": False,
"instructions": "<string>",
"from_display_name": "<string>",
"signature": "<string>",
"reply_to_all": True,
"ignore_senders": ["<string>"]
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
provider: 'resend',
agent_id: '<string>',
inbound_agent_version_id: '<string>',
outbound_from_address: '<string>',
enabled: true,
handler: 'agent',
handler_config: {
include_phone_number: false,
instructions: '<string>',
from_display_name: '<string>',
signature: '<string>',
reply_to_all: true,
ignore_senders: ['<string>']
}
})
};
fetch('https://api.anyreach.ai/core/email-addresses', 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.anyreach.ai/core/email-addresses",
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([
'address' => '<string>',
'provider' => 'resend',
'agent_id' => '<string>',
'inbound_agent_version_id' => '<string>',
'outbound_from_address' => '<string>',
'enabled' => true,
'handler' => 'agent',
'handler_config' => [
'include_phone_number' => false,
'instructions' => '<string>',
'from_display_name' => '<string>',
'signature' => '<string>',
'reply_to_all' => true,
'ignore_senders' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.anyreach.ai/core/email-addresses"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.anyreach.ai/core/email-addresses")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anyreach.ai/core/email-addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Headers
Organization ID for user PATs (pat_ prefix tokens)
Body
Create an inbound email routing address.
Inbound mailbox address
Email provider
Agent to answer this address (its latest published version is resolved). Alternative to inbound_agent_version_id.
Agent version that answers mail to this address
Verified sender used for replies (defaults to address)
Serve the agent on this address
What answers this address. 'agent' routes mail to an agent version; 'demo' builds a demo agent from the company URL in the mail and emails the requester when it's live.
agent, demo Options for handler='demo' (ignored otherwise)
Show child attributes
Show child attributes
Response
Successful Response
The response is of type Response Create Email Address Core Email Addresses Post · object.
curl --request POST \
--url https://api.anyreach.ai/core/email-addresses \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"provider": "resend",
"agent_id": "<string>",
"inbound_agent_version_id": "<string>",
"outbound_from_address": "<string>",
"enabled": true,
"handler": "agent",
"handler_config": {
"include_phone_number": false,
"instructions": "<string>",
"from_display_name": "<string>",
"signature": "<string>",
"reply_to_all": true,
"ignore_senders": [
"<string>"
]
}
}
'import requests
url = "https://api.anyreach.ai/core/email-addresses"
payload = {
"address": "<string>",
"provider": "resend",
"agent_id": "<string>",
"inbound_agent_version_id": "<string>",
"outbound_from_address": "<string>",
"enabled": True,
"handler": "agent",
"handler_config": {
"include_phone_number": False,
"instructions": "<string>",
"from_display_name": "<string>",
"signature": "<string>",
"reply_to_all": True,
"ignore_senders": ["<string>"]
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
address: '<string>',
provider: 'resend',
agent_id: '<string>',
inbound_agent_version_id: '<string>',
outbound_from_address: '<string>',
enabled: true,
handler: 'agent',
handler_config: {
include_phone_number: false,
instructions: '<string>',
from_display_name: '<string>',
signature: '<string>',
reply_to_all: true,
ignore_senders: ['<string>']
}
})
};
fetch('https://api.anyreach.ai/core/email-addresses', 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.anyreach.ai/core/email-addresses",
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([
'address' => '<string>',
'provider' => 'resend',
'agent_id' => '<string>',
'inbound_agent_version_id' => '<string>',
'outbound_from_address' => '<string>',
'enabled' => true,
'handler' => 'agent',
'handler_config' => [
'include_phone_number' => false,
'instructions' => '<string>',
'from_display_name' => '<string>',
'signature' => '<string>',
'reply_to_all' => true,
'ignore_senders' => [
'<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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.anyreach.ai/core/email-addresses"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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.anyreach.ai/core/email-addresses")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anyreach.ai/core/email-addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"provider\": \"resend\",\n \"agent_id\": \"<string>\",\n \"inbound_agent_version_id\": \"<string>\",\n \"outbound_from_address\": \"<string>\",\n \"enabled\": true,\n \"handler\": \"agent\",\n \"handler_config\": {\n \"include_phone_number\": false,\n \"instructions\": \"<string>\",\n \"from_display_name\": \"<string>\",\n \"signature\": \"<string>\",\n \"reply_to_all\": true,\n \"ignore_senders\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
