Change a template
PATCH/v1/templates/{id}
Any of the fields; the rest are kept. Sends from then on use the new version.
Parameters
| Name | In | Description |
|---|---|---|
| idrequired | path |
Body
| Field | Type | Description |
|---|---|---|
| name | string | |
| subject | string | |
| html | string | |
| text | string |
Example
curl -X PATCH https://api.woyra.io/v1/templates/email_01J... \
-H "Authorization: Bearer $WOYRA_KEY" \
-H 'Content-Type: application/json' \
-d '{
"name": "<name>",
"subject": "Your code",
"html": "<html>"
}'Response
200 The changed template.
| Field | Type | Description |
|---|---|---|
| object | "template" | |
| id | string | |
| name | string | |
| subject | string | |
| html | string | |
| text | string | |
| variables | array of string | The placeholders the template uses. |
| created_at | timestamp | |
| updated_at | timestamp |
Errors
| Status | Codes |
|---|---|
| 400 | invalid_request, unsupported_version |
| 404 | not_found, product_not_offered |
Also in Emails
- GET /v1/emails — List emails
- POST /v1/emails — Send an email
- GET /v1/emails/{id} — Retrieve an email
- POST /v1/emails/{id}/cancel — Cancel a scheduled email
- POST /v1/emails/batch — Send a batch of emails
- GET /v1/templates — List templates
- POST /v1/templates — Save an email template
- GET /v1/templates/{id} — Retrieve a template
- DELETE /v1/templates/{id} — Delete a template
- GET /t/o/{token} — Open tracking image
- GET /t/c/{token} — Click tracking redirect
- GET /v1/emails/inbound — Mail received on your domains
- GET /v1/emails/inbound/{id} — Retrieve a received email
- GET /v1/emails/inbound/{id}/attachments/{attachment_id} — Download an attachment
- GET /v1/emails/threads/{id} — A conversation