cURL
curl -X POST https://senderr.dev/api/v1/send \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"template_id": "550e8400-e29b-41d4-a716-446655440000",
"to": ["recipient@example.com"],
"subject": "Welcome!",
"variables": {
"name": "John Doe"
}
}'const response = await fetch('https://senderr.dev/api/v1/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
},
body: JSON.stringify({
template_id: '550e8400-e29b-41d4-a716-446655440000',
to: ['recipient@example.com'],
subject: 'Welcome!',
variables: {
name: 'John Doe'
}
})
});
const result = await response.json();
console.log(result);import requests
response = requests.post(
'https://senderr.dev/api/v1/send',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
},
json={
'template_id': '550e8400-e29b-41d4-a716-446655440000',
'to': ['recipient@example.com'],
'subject': 'Welcome!',
'variables': {
'name': 'John Doe'
}
}
)
result = response.json()
print(result)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://senderr.dev/api/v1/send",
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([
'template_id' => '550e8400-e29b-41d4-a716-446655440000',
'to' => [
'recipient@example.com'
],
'subject' => 'Welcome to our platform!',
'variables' => [
'name' => 'John Doe',
'company' => 'Acme Corp'
],
'from' => 'sender@yourcompany.com',
'reply_to' => 'support@yourcompany.com'
]),
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://senderr.dev/api/v1/send"
payload := strings.NewReader("{\n \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\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://senderr.dev/api/v1/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://senderr.dev/api/v1/send")
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 \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "re_01H123ABC...",
"from": "sender@yourcompany.com",
"to": [
"recipient@example.com"
],
"subject": "Welcome to our platform!",
"sent_at": "2024-01-01T12:00:00Z"
},
"meta": {
"email_usage": {
"monthly_limit": 1000,
"current_usage": 45,
"remaining": 955,
"plan_type": "monthly",
"is_overage": false,
"overage_emails": 0,
"stripe_usage_reported": false
}
}
}{
"error": "Invalid request body",
"code": "VALIDATION_ERROR",
"success": false,
"details": [
{
"field": "variables",
"message": "Variables must be an object"
}
]
}{
"error": "Authentication required",
"success": false
}{
"error": "Template not found",
"message": "This template is not in your library. Please purchase the template first to use it for sending emails.",
"success": false
}{
"error": "Email sending not allowed",
"message": "You have reached your monthly email sending limit",
"is_overage": true
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"success": false
}Email
Send Email Using Template
Send an email using a template from your library. Requires a verified custom domain or valid ‘from’ field.
POST
/
send
cURL
curl -X POST https://senderr.dev/api/v1/send \
-H "Content-Type: application/json" \
-H "X-API-Key: your-api-key" \
-d '{
"template_id": "550e8400-e29b-41d4-a716-446655440000",
"to": ["recipient@example.com"],
"subject": "Welcome!",
"variables": {
"name": "John Doe"
}
}'const response = await fetch('https://senderr.dev/api/v1/send', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
},
body: JSON.stringify({
template_id: '550e8400-e29b-41d4-a716-446655440000',
to: ['recipient@example.com'],
subject: 'Welcome!',
variables: {
name: 'John Doe'
}
})
});
const result = await response.json();
console.log(result);import requests
response = requests.post(
'https://senderr.dev/api/v1/send',
headers={
'Content-Type': 'application/json',
'X-API-Key': 'your-api-key'
},
json={
'template_id': '550e8400-e29b-41d4-a716-446655440000',
'to': ['recipient@example.com'],
'subject': 'Welcome!',
'variables': {
'name': 'John Doe'
}
}
)
result = response.json()
print(result)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://senderr.dev/api/v1/send",
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([
'template_id' => '550e8400-e29b-41d4-a716-446655440000',
'to' => [
'recipient@example.com'
],
'subject' => 'Welcome to our platform!',
'variables' => [
'name' => 'John Doe',
'company' => 'Acme Corp'
],
'from' => 'sender@yourcompany.com',
'reply_to' => 'support@yourcompany.com'
]),
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://senderr.dev/api/v1/send"
payload := strings.NewReader("{\n \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\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://senderr.dev/api/v1/send")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://senderr.dev/api/v1/send")
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 \"template_id\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"to\": [\n \"recipient@example.com\"\n ],\n \"subject\": \"Welcome to our platform!\",\n \"variables\": {\n \"name\": \"John Doe\",\n \"company\": \"Acme Corp\"\n },\n \"from\": \"sender@yourcompany.com\",\n \"reply_to\": \"support@yourcompany.com\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "re_01H123ABC...",
"from": "sender@yourcompany.com",
"to": [
"recipient@example.com"
],
"subject": "Welcome to our platform!",
"sent_at": "2024-01-01T12:00:00Z"
},
"meta": {
"email_usage": {
"monthly_limit": 1000,
"current_usage": 45,
"remaining": 955,
"plan_type": "monthly",
"is_overage": false,
"overage_emails": 0,
"stripe_usage_reported": false
}
}
}{
"error": "Invalid request body",
"code": "VALIDATION_ERROR",
"success": false,
"details": [
{
"field": "variables",
"message": "Variables must be an object"
}
]
}{
"error": "Authentication required",
"success": false
}{
"error": "Template not found",
"message": "This template is not in your library. Please purchase the template first to use it for sending emails.",
"success": false
}{
"error": "Email sending not allowed",
"message": "You have reached your monthly email sending limit",
"is_overage": true
}{
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"success": false
}Authorizations
BearerAuthSessionAuth
Use your API key from the dashboard. Format: Bearer your-api-key-here
Body
application/json
ID of the template to use for sending the email
Recipient email address(es)
Email subject line
CC email address(es)
BCC email address(es)
Reply-to email address(es)
Sender email address. Can be 'email@domain.com' or 'Name email@domain.com' format. If not provided, uses your verified domain.
Variables to use when rendering the template
Plain text version of the email (optional)
Custom headers for the email
Show child attributes
Show child attributes
Email attachments
Show child attributes
Show child attributes
Email tags for tracking and organization
Show child attributes
Show child attributes
Schedule email for future delivery (ISO 8601 format)
⌘I