messages.saveTemplate
Set the subject and body wording for one kind of automatic customer email. Use the kind's placeholders ({first_name}, {shop}, {job} and so on). The body must contain the kind's link placeholder ({pay_link}, {quote_link} or {review_link}) exactly once; Doing Work fills in the link and the sender line, and those cannot be changed. Replaces any earlier template for that kind.
| Who | Agents can call this |
| REST | POST /v1/messages/templates |
| MCP tool | messages_saveTemplate |
| Writes | yes, send an Idempotency-Key |
| Area | Customer hub, requests and customer emails |
When to use it
The shop can set its own wording for the automatic customer emails: invoice reminders, quote follow-ups and review requests. Read messages.templates for the wording in use and the placeholders each kind takes.
What to tell the owner
Say what you did in plain words and what happens next.
Input
| Field | Type | Required |
|---|---|---|
shop_id | string (uuid) | yes |
kind | string (one of invoice_reminder, quote_followup, review_request) | yes |
subject | string | yes |
body | string | yes |
Example
POST https://doingwork.work/v1/messages/templates
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"kind": "invoice_reminder",
"subject": "...",
"body": "..."
}Output
JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.
Errors
| Code | Status | What to do |
|---|---|---|
invalid_input, invalid_token, rate_limited | Can happen on any call. See errors. |