Skip to main content
POST
/
v1
/
transactional
/
template
Send Transactional Email Template
const options = {
  method: 'POST',
  headers: {
    Authorization: '<api-key>',
    'Auth-Type': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    params: {
      transactional_template_id: '550e8400-e29b-41d4-a716-446655440000',
      to: 'user@example.com',
      variables: {
        first_name: 'John',
        company_name: 'Acme Corp',
        activation_url: 'https://app.yourdomain.com/activate?token=xyz'
      }
    }
  })
};

fetch('https://api.flywheel.cx/v1/transactional/template', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "email_id": "987fcdeb-51a2-43d1-9f12-123456789abc"
}

Authorizations

Authorization
string
header
required

Enter your API key obtained from the Flywheel dashboard (without 'Bearer ' prefix)

Auth-Type
string
header
default:api
required

Authentication type header. Must be set to 'api' for all API requests.

Body

application/json
params
object
required

Response

Email sent successfully

success
boolean

Whether the email was sent successfully

Example:

true

email_id
string<uuid>

Unique UUID identifier for the sent email, can be used for tracking delivery status

Example:

"123e4567-e89b-12d3-a456-426614174000"