Skip to content

Send one message with a template's live version

POST
/api/v1/workspaces/{workspace}/transactional/messages
# REPUTECAST_API_KEY: an API key (rc_live_…) with transactional:send.
# Replace reputecast.example.com with your public URL and your-workspace with your workspace slug.
curl --request POST \
--url https://reputecast.example.com/api/v1/workspaces/your-workspace/transactional/messages \
--header "Authorization: Bearer $REPUTECAST_API_KEY" \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: password-reset-8f14e45f' \
--data '{
"template": "password-reset",
"to": { "email": "sam.rivera@outlook.com", "name": "Sam Rivera" },
"data": {
"first_name": "Sam",
"reset_url": "https://app.example.com/reset/8f14e45f",
"expires_in": "30 minutes"
},
"tags": ["password-reset"]
}'

Permission: transactional:send (sensitive)

Answers 202 with the message ID and status queued (scheduled with send_at). Errors are RFC 9457 problems whose detail says what to fix: template_not_found, template_not_published, missing_variables (listed in missing), invalid_recipient, recipient_suppressed (with the reason and date), sender_not_verified, attachments_too_large (naming the route’s provider limit), rate_limited (with Retry-After), no_healthy_route. Send an Idempotency-Key header: a retry with the same key within 24 hours gets the first answer and sends nothing. A test-mode key delivers only to the workspace’s members and its allowed test addresses.

workspace
required

Workspace slug

string
/^[a-z0-9][a-z0-9-]{1,62}$/

Workspace slug

Idempotency-Key

A retry with the same key within 24 hours never sends twice

string
<= 255 characters

A retry with the same key within 24 hours never sends twice

Media typeapplication/json
object
attachments
Array<object>
<= 20 items
object
content
required

The file, base64-encoded

string
content_id

Makes it an inline image the HTML references as cid:<content_id>

string
<= 200 characters
content_type

Guessed from the file name when omitted

string
<= 200 characters
filename
required
string
>= 1 characters <= 255 characters
bcc
Array<object>
<= 20 items
object
email
required
string
<= 254 characters
name
string
<= 200 characters
cc
Array<object>
<= 20 items
object
email
required
string
<= 254 characters
name
string
<= 200 characters
data

The template’s variables

object
key
additional properties
from

A verified Transactional sender, as an address or “Name

”; the template’s sender when omitted

string
<= 320 characters
language

The language version to send; the linked contact’s language, then the fallback, when omitted

string
<= 16 characters
metadata
object
key
additional properties
string
preheader

Overrides the template’s preheader (Liquid)

string
<= 500 characters
reply_to
string
<= 320 characters
send_at

Send later, up to 72 hours ahead

string format: date-time
subject

Overrides the template’s subject (Liquid)

string
<= 998 characters
tags

Returned with every webhook event of the message

Array<string>
<= 10 items
template
required

The template’s ID

string
>= 1 characters <= 64 characters
to
required
object
email
required
string
<= 254 characters
name
string
<= 200 characters

Accepted

Media typeapplication/json
object
detail
string
id
required
string
send_at
string format: date-time
status
required

Not_delivered: a test-mode key’s message to an address that isn’t allowed

string
Allowed values: queued scheduled not_delivered
test

Sent with a test-mode key

boolean

Example

{
"id": "0192f1c4-7b2e-7c51-9d0a-3f5e8b1a2c44",
"status": "queued"
}

Error

Media typeapplication/problem+json
object
code

Stable error code, e.g. permission_denied

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object>
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

helpers

Members who hold the missing permission

Array<string>
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
meta
object
key
additional properties
permission

The missing permission key

string
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}