Send Email
curl --request POST \
--url https://sending.sendrapp.org/email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"emailConfig": {
"subject": "<string>",
"from": "<string>",
"body": "<string>",
"fromName": "<string>",
"companyName": "<string>",
"companyAddress": "<string>",
"companyWebsite": "<string>",
"returnPath": "jsmith@example.com",
"unsubscribeUrl": "<string>",
"trackOpens": true,
"trackClicks": true
}
}
'import requests
url = "https://sending.sendrapp.org/email"
payload = {
"recipients": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"emailConfig": {
"subject": "<string>",
"from": "<string>",
"body": "<string>",
"fromName": "<string>",
"companyName": "<string>",
"companyAddress": "<string>",
"companyWebsite": "<string>",
"returnPath": "jsmith@example.com",
"unsubscribeUrl": "<string>",
"trackOpens": True,
"trackClicks": True
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [{email: 'jsmith@example.com', name: '<string>'}],
emailConfig: {
subject: '<string>',
from: '<string>',
body: JSON.stringify('<string>'),
fromName: '<string>',
companyName: '<string>',
companyAddress: '<string>',
companyWebsite: '<string>',
returnPath: 'jsmith@example.com',
unsubscribeUrl: '<string>',
trackOpens: true,
trackClicks: true
}
})
};
fetch('https://sending.sendrapp.org/email', 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://sending.sendrapp.org/email",
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([
'recipients' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>'
]
],
'emailConfig' => [
'subject' => '<string>',
'from' => '<string>',
'body' => '<string>',
'fromName' => '<string>',
'companyName' => '<string>',
'companyAddress' => '<string>',
'companyWebsite' => '<string>',
'returnPath' => 'jsmith@example.com',
'unsubscribeUrl' => '<string>',
'trackOpens' => true,
'trackClicks' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sending.sendrapp.org/email"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://sending.sendrapp.org/email")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sending.sendrapp.org/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "IN PROGRESS",
"message": "<string>",
"batchId": "<string>",
"limits": {
"limit": 123,
"used": 123,
"remaining": 123,
"requested": 123
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Email API
Sending Email
Send an email to one or multiple recipients
POST
/
email
Send Email
curl --request POST \
--url https://sending.sendrapp.org/email \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"recipients": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"emailConfig": {
"subject": "<string>",
"from": "<string>",
"body": "<string>",
"fromName": "<string>",
"companyName": "<string>",
"companyAddress": "<string>",
"companyWebsite": "<string>",
"returnPath": "jsmith@example.com",
"unsubscribeUrl": "<string>",
"trackOpens": true,
"trackClicks": true
}
}
'import requests
url = "https://sending.sendrapp.org/email"
payload = {
"recipients": [
{
"email": "jsmith@example.com",
"name": "<string>"
}
],
"emailConfig": {
"subject": "<string>",
"from": "<string>",
"body": "<string>",
"fromName": "<string>",
"companyName": "<string>",
"companyAddress": "<string>",
"companyWebsite": "<string>",
"returnPath": "jsmith@example.com",
"unsubscribeUrl": "<string>",
"trackOpens": True,
"trackClicks": True
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [{email: 'jsmith@example.com', name: '<string>'}],
emailConfig: {
subject: '<string>',
from: '<string>',
body: JSON.stringify('<string>'),
fromName: '<string>',
companyName: '<string>',
companyAddress: '<string>',
companyWebsite: '<string>',
returnPath: 'jsmith@example.com',
unsubscribeUrl: '<string>',
trackOpens: true,
trackClicks: true
}
})
};
fetch('https://sending.sendrapp.org/email', 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://sending.sendrapp.org/email",
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([
'recipients' => [
[
'email' => 'jsmith@example.com',
'name' => '<string>'
]
],
'emailConfig' => [
'subject' => '<string>',
'from' => '<string>',
'body' => '<string>',
'fromName' => '<string>',
'companyName' => '<string>',
'companyAddress' => '<string>',
'companyWebsite' => '<string>',
'returnPath' => 'jsmith@example.com',
'unsubscribeUrl' => '<string>',
'trackOpens' => true,
'trackClicks' => true
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://sending.sendrapp.org/email"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://sending.sendrapp.org/email")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sending.sendrapp.org/email")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ],\n \"emailConfig\": {\n \"subject\": \"<string>\",\n \"from\": \"<string>\",\n \"body\": \"<string>\",\n \"fromName\": \"<string>\",\n \"companyName\": \"<string>\",\n \"companyAddress\": \"<string>\",\n \"companyWebsite\": \"<string>\",\n \"returnPath\": \"jsmith@example.com\",\n \"unsubscribeUrl\": \"<string>\",\n \"trackOpens\": true,\n \"trackClicks\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "IN PROGRESS",
"message": "<string>",
"batchId": "<string>",
"limits": {
"limit": 123,
"used": 123,
"remaining": 123,
"requested": 123
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Send an HTML email to one or multiple recipients. Delivery is asynchronous: a successful request returns
202 Accepted with a batchId, and the emails are processed in the background.
Maximum 500 recipients per API call. Unsubscribed recipients are filtered out automatically before sending and do not count toward your sending limit.
Request
The body has two parts:recipients— array of{ email, name? }(1–500 items,emailrequired).emailConfig— message configuration.
emailConfig fields: subject, from, body (HTML).
Optional emailConfig fields:
| Field | Notes |
|---|---|
fromName | Sender display name |
companyName | Per-send override; falls back to your tenant’s saved company name |
companyAddress | Per-send override; falls back to your tenant’s saved mailing address |
companyWebsite | Per-send override (valid URL); falls back to your tenant’s saved website |
returnPath | Return-Path / bounce address |
unsubscribeUrl | May contain the {{email}} placeholder, replaced with the recipient’s address |
trackOpens | Defaults to true |
trackClicks | Defaults to true |
Response
202 Accepted: Processing started. Returnsstatus: "IN PROGRESS",message,batchId, and alimitsobject.400 Bad Request: Invalid request parameters or malformed JSON401 Unauthorized: Authentication required or invalid API key500 Internal Server Error: Unexpected server error
The response
limits object shows your sending-quota usage for this request (limit, used, remaining, requested). requested reflects the recipient count after unsubscribed addresses are filtered out.Authenticate with your API key in the
Authorization header. The key must have the emailSend scope.Authorizations
Body
application/json
Email configuration and recipients. Maximum 500 recipients per API call. Unsubscribed recipients are filtered out automatically and do not count toward your sending limit.
Response
Accepted — email processing has started. Delivery happens asynchronously.
⌘I