Skip to main content
POST
/
templates
/
{id}
/
render
Render Template
curl --request POST \
  --url https://senderr.dev/api/v1/templates/{id}/render \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "variables": {
    "name": "John Doe",
    "email": "[email protected]",
    "company": "Acme Corp"
  },
  "format": "html"
}
'
{
  "success": true,
  "html": "<!DOCTYPE html><html><body><h1>Hello John Doe</h1></body></html>"
}

Authorizations

Authorization
string
header
required

Use your API key from the dashboard. Format: Bearer your-api-key-here

Path Parameters

id
string<uuid>
required

Template ID

Body

application/json
variables
object
required

Template variables as key-value pairs

format
enum<string>
default:html

Output format

Available options:
html,
react

Response

Template rendered successfully

success
boolean
Example:

true

html
string

Rendered HTML output (when format=html)

react
string

React component code (when format=react)