WoyraDocs
Get an API key

Change a template

PATCH/v1/templates/{id}

Emails · Requires an API key

Any of the fields; the rest are kept. Sends from then on use the new version.

Parameters

NameInDescription
idrequiredpath

Body

FieldTypeDescription
namestring
subjectstring
htmlstring
textstring

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.

FieldTypeDescription
object"template"
idstring
namestring
subjectstring
htmlstring
textstring
variablesarray of stringThe placeholders the template uses.
created_attimestamp
updated_attimestamp

Errors

StatusCodes
400invalid_request, unsupported_version
404not_found, product_not_offered

Also in Emails