textstringPlain text or Markdown body. Rendered as HTML via Markdown if no html is provided.
Example: "# Pulse Report\n\nHere's your weekly summary."
API REFERENCE
/api/emailsSend an email to one or more recipients. Emails are sent from Agent by Recoup <agent@recoupable.dev>.
See the authentication guide for API key and account access requirements.
curl --request POST \
--url 'https://api.recoupable.dev/api/emails' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"to": [
"recipient@example.com"
],
"cc": [
"cc@example.com"
],
"subject": "Weekly Pulse Report",
"text": "# Pulse Report\n\nHere'"'"'s your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here'"'"'s your weekly summary.</p>",
"headers": {},
"chat_id": "string",
"account_id": "YOUR_ID"
}'Fill in the fields, send the request from your browser, and read the live response. The curl below updates as you type.
Kept in this browser tab only and cleared when it closes.
curl --request POST \
--url 'https://api.recoupable.dev/api/emails' \
--header 'Content-Type: application/json' \
--data '{
"to": [
"recipient@example.com"
],
"cc": [
"cc@example.com"
],
"subject": "Weekly Pulse Report",
"text": "# Pulse Report\n\nHere'"'"'s your weekly summary.",
"html": "<h1>Pulse Report</h1><p>Here'"'"'s your weekly summary.</p>",
"headers": {},
"chat_id": "string",
"account_id": "YOUR_ID"
}'Email payload
application/json
toarray<string>Recipient email address(es). Optional — when omitted, the email is sent to the authenticated account's own email address. Without a payment method on file, restricted to the account's own email; add a payment method to send to any recipient.
Example: ["recipient@example.com"]
minItems: 1
string
ccarray<string>Optional CC email addresses. Without a payment method on file, restricted to the account's own email; add a payment method to send to any recipient.
Example: ["cc@example.com"]
string
subjectstringEmail subject line. Optional — when omitted, defaults to the first heading or line of the body, falling back to Message from Recoup if the body is empty.
Example: "Weekly Pulse Report"
textstringPlain text or Markdown body. Rendered as HTML via Markdown if no html is provided.
Example: "# Pulse Report\n\nHere's your weekly summary."
htmlstringRaw HTML body. Takes precedence over text when both are provided.
Example: "<h1>Pulse Report</h1><p>Here's your weekly summary.</p>"
headersobjectOptional custom email headers
chat_idstringChat ID to include a chat link in the email footer. Use Create Chat to create one.
account_idstringUUID of the account to send the email for. Only applicable when the authenticated account has access to multiple accounts via organization membership. If not provided, sends for the API key's own account.
format: uuid
application/json
successbooleanrequiredWhether the email was sent successfully
Example: true
messagestringrequiredHuman-readable result message
Example: "Email sent successfully from Agent by Recoup <agent@recoupable.dev> to recipient@example.com."
idstringrequiredResend email ID
Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
application/json
errorintegerrequiredformat: int32
messagestringrequiredapplication/json
errorintegerrequiredformat: int32
messagestringrequiredapplication/json
errorintegerrequiredformat: int32
messagestringrequiredDownload the OpenAPI file for complete schemas, constraints, and examples.
Download accounts.json{
"operationId": "postEmails",
"description": "Send an email to one or more recipients. Emails are sent from `Agent by Recoup <agent@recoupable.dev>`.",
"requestBody": {
"description": "Email payload",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendEmailRequest"
}
}
}
},
"responses": {
"200": {
"description": "Email sent successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmailResponse"
}
}
}
},
"400": {
"description": "Validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Authentication required",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"502": {
"description": "Email delivery failed",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}