Send an email
An email, sent from the company’s own sending address. Needs outbound_messages.email.
curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/messages/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": "0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58",
"message_type": "transactional",
"idempotency_key": "order-104882-shipped",
"subject": "Your order 104882 has shipped",
"html": "<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>",
"text": "Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.",
"reply_to": "support@shop.example.com"
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/messages/email"
payload = {
"member_id": "0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58",
"message_type": "transactional",
"idempotency_key": "order-104882-shipped",
"subject": "Your order 104882 has shipped",
"html": "<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>",
"text": "Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.",
"reply_to": "support@shop.example.com"
}
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({
member_id: '0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58',
message_type: 'transactional',
idempotency_key: 'order-104882-shipped',
subject: 'Your order 104882 has shipped',
html: '<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>',
text: 'Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.',
reply_to: 'support@shop.example.com'
})
};
fetch('https://api.fluid.app/api/company/v2026-10/messages/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.fluid.app/api/company/v2026-10/messages/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([
'member_id' => '0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58',
'message_type' => 'transactional',
'idempotency_key' => 'order-104882-shipped',
'subject' => 'Your order 104882 has shipped',
'html' => '<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>',
'text' => 'Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.',
'reply_to' => 'support@shop.example.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://api.fluid.app/api/company/v2026-10/messages/email"
payload := strings.NewReader("{\n \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.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://api.fluid.app/api/company/v2026-10/messages/email")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/messages/email")
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 \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.com\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
An admin session, company API token, droplet token or bot token.
Headers
Use this or idempotency_key in the body.
Body
An email, sent from the company's own sending address.
1 - 998An email address (email) or an E.164 phone number (sms, whatsapp). Use this or one of the ids.
A contact's id or uuid. Fluid uses the contact's best email or phone for the channel.
A customer's id, as the customers API returns it. Customers and members are the same people.
A member's uuid.
marketing needs the recipient's marketing consent for the channel.
transactional, marketing A key you choose. Sending again with the same key answers with the first message instead of sending twice. You can send it as the Idempotency-Key header instead.
200The HTML body. Send html, text or both.
The plain-text body.
An address replies go to.
A marketing message asked for during the recipient's quiet hours (21:00 to 08:00 in their time zone by default) waits and goes out when they end. Pass true to have it refused as quiet_hours with send_at instead.
Response
A repeat of an earlier request with the same idempotency key; the first message is returned and nothing is sent again.
curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/messages/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"member_id": "0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58",
"message_type": "transactional",
"idempotency_key": "order-104882-shipped",
"subject": "Your order 104882 has shipped",
"html": "<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>",
"text": "Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.",
"reply_to": "support@shop.example.com"
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/messages/email"
payload = {
"member_id": "0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58",
"message_type": "transactional",
"idempotency_key": "order-104882-shipped",
"subject": "Your order 104882 has shipped",
"html": "<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>",
"text": "Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.",
"reply_to": "support@shop.example.com"
}
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({
member_id: '0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58',
message_type: 'transactional',
idempotency_key: 'order-104882-shipped',
subject: 'Your order 104882 has shipped',
html: '<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>',
text: 'Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.',
reply_to: 'support@shop.example.com'
})
};
fetch('https://api.fluid.app/api/company/v2026-10/messages/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.fluid.app/api/company/v2026-10/messages/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([
'member_id' => '0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58',
'message_type' => 'transactional',
'idempotency_key' => 'order-104882-shipped',
'subject' => 'Your order 104882 has shipped',
'html' => '<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>',
'text' => 'Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.',
'reply_to' => 'support@shop.example.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://api.fluid.app/api/company/v2026-10/messages/email"
payload := strings.NewReader("{\n \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.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://api.fluid.app/api/company/v2026-10/messages/email")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/messages/email")
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 \"member_id\": \"0199c2d4-8a1e-7b35-9f02-6d4e1a7c3b58\",\n \"message_type\": \"transactional\",\n \"idempotency_key\": \"order-104882-shipped\",\n \"subject\": \"Your order 104882 has shipped\",\n \"html\": \"<p>Hi Jordan, your order <strong>104882</strong> is on its way. Track it at https://shop.example.com/orders/104882.</p>\",\n \"text\": \"Hi Jordan, your order 104882 is on its way. Track it at https://shop.example.com/orders/104882.\",\n \"reply_to\": \"support@shop.example.com\"\n}"
response = http.request(request)
puts response.read_body