Skip to main content
POST
/
send
/
email
Send transactional email
curl --request POST \
  --url https://api.sendx.io/api/v1/rest/send/email \
  --header 'Content-Type: application/json' \
  --header 'X-Team-ApiKey: <api-key>' \
  --data '
{
  "from": {
    "email": "from@example.com",
    "name": "From Name"
  },
  "to": [
    {
      "email": "to@example.com",
      "name": "To Name",
      "customFields": {}
    }
  ],
  "subject": "Your Subject Here",
  "htmlBody": "<h1>Your HTML Content</h1>",
  "textBody": "Your Text Content",
  "headers": {
    "X-Custom-Header": "Value"
  }
}
'
import requests

url = "https://api.sendx.io/api/v1/rest/send/email"

payload = {
"from": {
"email": "from@example.com",
"name": "From Name"
},
"to": [
{
"email": "to@example.com",
"name": "To Name",
"customFields": {}
}
],
"subject": "Your Subject Here",
"htmlBody": "<h1>Your HTML Content</h1>",
"textBody": "Your Text Content",
"headers": { "X-Custom-Header": "Value" }
}
headers = {
"X-Team-ApiKey": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'X-Team-ApiKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: {email: 'from@example.com', name: 'From Name'},
to: [{email: 'to@example.com', name: 'To Name', customFields: {}}],
subject: 'Your Subject Here',
htmlBody: '<h1>Your HTML Content</h1>',
textBody: 'Your Text Content',
headers: {'X-Custom-Header': 'Value'}
})
};

fetch('https://api.sendx.io/api/v1/rest/send/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://api.sendx.io/api/v1/rest/send/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([
'from' => [
'email' => 'from@example.com',
'name' => 'From Name'
],
'to' => [
[
'email' => 'to@example.com',
'name' => 'To Name',
'customFields' => [

]
]
],
'subject' => 'Your Subject Here',
'htmlBody' => '<h1>Your HTML Content</h1>',
'textBody' => 'Your Text Content',
'headers' => [
'X-Custom-Header' => 'Value'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Team-ApiKey: <api-key>"
],
]);

$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.sendx.io/api/v1/rest/send/email"

payload := strings.NewReader("{\n \"from\": {\n \"email\": \"from@example.com\",\n \"name\": \"From Name\"\n },\n \"to\": [\n {\n \"email\": \"to@example.com\",\n \"name\": \"To Name\",\n \"customFields\": {}\n }\n ],\n \"subject\": \"Your Subject Here\",\n \"htmlBody\": \"<h1>Your HTML Content</h1>\",\n \"textBody\": \"Your Text Content\",\n \"headers\": {\n \"X-Custom-Header\": \"Value\"\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-Team-ApiKey", "<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://api.sendx.io/api/v1/rest/send/email")
.header("X-Team-ApiKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": {\n \"email\": \"from@example.com\",\n \"name\": \"From Name\"\n },\n \"to\": [\n {\n \"email\": \"to@example.com\",\n \"name\": \"To Name\",\n \"customFields\": {}\n }\n ],\n \"subject\": \"Your Subject Here\",\n \"htmlBody\": \"<h1>Your HTML Content</h1>\",\n \"textBody\": \"Your Text Content\",\n \"headers\": {\n \"X-Custom-Header\": \"Value\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.sendx.io/api/v1/rest/send/email")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Team-ApiKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": {\n \"email\": \"from@example.com\",\n \"name\": \"From Name\"\n },\n \"to\": [\n {\n \"email\": \"to@example.com\",\n \"name\": \"To Name\",\n \"customFields\": {}\n }\n ],\n \"subject\": \"Your Subject Here\",\n \"htmlBody\": \"<h1>Your HTML Content</h1>\",\n \"textBody\": \"Your Text Content\",\n \"headers\": {\n \"X-Custom-Header\": \"Value\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "message": "Email queued for delivery"
}
🎯 Key Features:
  • Send to multiple recipients with CC/BCC support
  • HTML, plain text, and AMP content
  • Custom headers and tracking options
  • Webhook notifications for delivery events
📋 Rate Limits:
  • Account-based email sending limits apply

Authorizations

X-Team-ApiKey
string
header
required

Team API key for authentication. Find your API key in SendX Settings → Team API Key.

Example:

X-Team-ApiKey: your_team_api_key_here

Body

application/json
from
object
required
to
object[]
required
Minimum array length: 1
subject
string
required
Example:

"Your Subject Here"

htmlBody
string
required
Example:

"<h1>Your HTML Content</h1>"

replyTo
object
textBody
string
Example:

"Your Text Content"

headers
object

Custom headers can be added to the email. These will be passed on when receving webhooks events for this email.

Example:
{ "X-Custom-Header": "Value" }

Response

✅ Email queued for delivery

Success response when transactional email is queued for delivery (202 Accepted)

status
enum<string>
required
Available options:
success
Example:

"success"

message
string
required
Example:

"Email queued for delivery"