Update wiki

This commit is contained in:
Dries Augustyns
2025-12-07 10:25:18 +01:00
parent b2ecf60a13
commit 0003e44db8
23 changed files with 3336 additions and 5 deletions
+32 -1
View File
@@ -148,13 +148,15 @@ Access nested objects with dot notation:
### Transactional emails
Use the `template` field with the **template ID** (not the template name):
```bash
curl -X POST {{API_URL}}/v1/send \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"to": "[email protected]",
"template": "order-confirmation",
"template": "clx123abc456",
"data": {
"orderNumber": "12345",
"deliveryDate": "March 20"
@@ -162,6 +164,35 @@ curl -X POST {{API_URL}}/v1/send \
}'
```
**Finding your template ID:**
- In the dashboard: Go to Templates → Click on your template → Copy the ID from the URL or template details
- Via API: Use `GET /templates` to list all templates with their IDs
When using a template:
- **Subject, body, from, and reply-to** are automatically taken from the template
- **Template variables** (e.g., `{{orderNumber}}`) are populated from the `data` field
- You can **override** any template value by explicitly providing it in the request (see example below)
### Overriding template values
```bash
curl -X POST {{API_URL}}/v1/send \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"to": "[email protected]",
"template": "clx123abc456",
"subject": "Custom Subject (overrides template)",
"from": {
"name": "Custom Sender",
"email": "[email protected]"
},
"data": {
"orderNumber": "12345"
}
}'
```
### In workflows
When creating a **Send Email** workflow step, select the template from the dropdown. Variables are automatically filled from contact data and workflow context.