curl --request POST \
--url https://api.recoupable.com/api/notifications \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"subject": "Weekly Pulse Report",
"cc": [
"cc@example.com"
],
"text": "# Pulse Report\n\nHere's your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here's your weekly summary.</p>",
"headers": {},
"room_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
EOFimport requests
url = "https://api.recoupable.com/api/notifications"
payload = {
"subject": "Weekly Pulse Report",
"cc": ["cc@example.com"],
"text": "# Pulse Report
Here's your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here's your weekly summary.</p>",
"headers": {},
"room_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
subject: 'Weekly Pulse Report',
cc: ['cc@example.com'],
text: '# Pulse Report\n\nHere\'s your weekly summary.',
html: '<h1>Pulse Report</h1><p>Here\'s your weekly summary.</p>',
headers: {},
room_id: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.recoupable.com/api/notifications', 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.recoupable.com/api/notifications",
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([
'subject' => 'Weekly Pulse Report',
'cc' => [
'cc@example.com'
],
'text' => '# Pulse Report
Here\'s your weekly summary.',
'html' => '<h1>Pulse Report</h1><p>Here\'s your weekly summary.</p>',
'headers' => [
],
'room_id' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.recoupable.com/api/notifications"
payload := strings.NewReader("{\n \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.recoupable.com/api/notifications")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.com/api/notifications")
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 \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Email sent successfully from Agent by Recoup <agent@recoupable.com> to user@example.com.",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Send Notification
Send a notification email to the authenticated account’s email address via the Resend API. Emails are sent from Agent by Recoup <agent@recoupable.com>. The recipient is automatically resolved from the API key or Bearer token. Supports plain text (rendered as Markdown) or raw HTML bodies, optional CC recipients, custom headers, and an optional room_id to include a chat link in the email footer.
curl --request POST \
--url https://api.recoupable.com/api/notifications \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"subject": "Weekly Pulse Report",
"cc": [
"cc@example.com"
],
"text": "# Pulse Report\n\nHere's your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here's your weekly summary.</p>",
"headers": {},
"room_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
EOFimport requests
url = "https://api.recoupable.com/api/notifications"
payload = {
"subject": "Weekly Pulse Report",
"cc": ["cc@example.com"],
"text": "# Pulse Report
Here's your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here's your weekly summary.</p>",
"headers": {},
"room_id": "<string>",
"account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
subject: 'Weekly Pulse Report',
cc: ['cc@example.com'],
text: '# Pulse Report\n\nHere\'s your weekly summary.',
html: '<h1>Pulse Report</h1><p>Here\'s your weekly summary.</p>',
headers: {},
room_id: '<string>',
account_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.recoupable.com/api/notifications', 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.recoupable.com/api/notifications",
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([
'subject' => 'Weekly Pulse Report',
'cc' => [
'cc@example.com'
],
'text' => '# Pulse Report
Here\'s your weekly summary.',
'html' => '<h1>Pulse Report</h1><p>Here\'s your weekly summary.</p>',
'headers' => [
],
'room_id' => '<string>',
'account_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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.recoupable.com/api/notifications"
payload := strings.NewReader("{\n \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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.recoupable.com/api/notifications")
.header("Content-Type", "application/json")
.body("{\n \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.recoupable.com/api/notifications")
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 \"subject\": \"Weekly Pulse Report\",\n \"cc\": [\n \"cc@example.com\"\n ],\n \"text\": \"# Pulse Report\\n\\nHere's your weekly summary.\",\n \"html\": \"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>\",\n \"headers\": {},\n \"room_id\": \"<string>\",\n \"account_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Email sent successfully from Agent by Recoup <agent@recoupable.com> to user@example.com.",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Body
Notification email payload
Email subject line
"Weekly Pulse Report"
Optional CC email addresses
["cc@example.com"]
Plain text or Markdown body. Rendered as HTML via Markdown if no html is provided.
"# Pulse Report\n\nHere's your weekly summary."
Raw HTML body. Takes precedence over text when both are provided.
"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>"
Optional custom email headers
Show child attributes
Show child attributes
Room ID to include a chat link in the email footer
UUID of the account to send the notification for. Only applicable when the authenticated account has access to multiple accounts via organization membership. If not provided, sends the notification for the API key's own account.
Response
Notification sent successfully
Was this page helpful?
