Skip to main content
POST
/
api
/
notifications
cURL
curl --request POST \
  --url https://recoup-api.vercel.app/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"
}
EOF
{
  "success": true,
  "message": "Email sent successfully from Agent by Recoup <agent@recoupable.com> to user@example.com.",
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

Documentation Index

Fetch the complete documentation index at: https://developers.recoupable.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Notification email payload

subject
string
required

Email subject line

Example:

"Weekly Pulse Report"

cc
string<email>[]

Optional CC email addresses

Example:
["cc@example.com"]
text
string

Plain text or Markdown body. Rendered as HTML via Markdown if no html is provided.

Example:

"# Pulse Report\n\nHere's your weekly summary."

html
string

Raw HTML body. Takes precedence over text when both are provided.

Example:

"<h1>Pulse Report</h1><p>Here's your weekly summary.</p>"

headers
object

Optional custom email headers

room_id
string

Room ID to include a chat link in the email footer

account_id
string<uuid>

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

success
boolean

Whether the notification was sent successfully

Example:

true

message
string

Human-readable result message

Example:

"Email sent successfully from Agent by Recoup <agent@recoupable.com> to user@example.com."

id
string

Resend email ID

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"