messages.previewTemplate
Show how one kind of automatic customer email reads, filled with sample customer details and the shop's name. Send subject and body to preview unsaved wording (checked the same way as saving); leave them out to preview the wording in use. Sends nothing.
When to use it
Show how one kind of automatic customer email reads, filled with sample customer details and the shop's name. Send subject and body to preview unsaved wording (checked the same way as saving); leave them out to preview the wording in use.
What to tell the owner
Tell them what you found in plain words. Don't read back raw fields.
| Field | Type | Required |
|---|
shop_id | string (uuid) | yes |
kind | string (one of invoice_reminder, quote_followup, review_request) | yes |
subject | string | no |
body | string | no |
Example
POST https://doingwork.work/v1/messages/templates/preview
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"kind": "invoice_reminder"
}
Output
| Field | Type | Always there |
|---|
subject | string | yes |
body | string | yes |
from_name | string | yes |
note | string | yes |
{
"subject": "...",
"body": "...",
"from_name": "...",
"note": "..."
}
Errors
| Code | Status | What to do |
|---|
invalid_input, invalid_token, rate_limited | | Can happen on any call. See errors. |