Email Templates

Update an email template

Changes an email template of the account. It is a PARTIAL write: what the body does not name is left as it is, and the answer carries before, which is the body that puts the template back.

EVERY SCHEDULE THAT NAMES IT is sent with the new text from the next delivery onwards -- /v1/schedules/list says which ones -- so read the template with /v1/email-templates/get before changing it. Nothing is sent by this call and no cache is emptied.

The same rules as a creation apply to the values this body carries: the sender has to belong to the account, the body is stored as it is and the refused content of the platform is refused here too. The one template with a rule of its own is the one the client portal sends its notifications with: its body has to keep %%BODY%%, which is where the portal writes its message.

The object /v1/email-templates/get answers can be sent back as it is.

Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.

post/email-templates/update

Request

  • Base URL: https://api.reportingninja.com/v1
  • URL: https://api.reportingninja.com/v1/email-templates/update
  • Auth: HTTP bearer

Request body

email_template_keystring required

The template to change. From /v1/email-templates/list.

namestring nullable

Left out or null, it is left as it is.

internal_notesstring nullable

An empty string takes the note away; null leaves it as it is.

format'plain_text' | 'html' nullable

Left out or null, it is left as it is.

senderstring nullable

Left out or null, it is left as it is.

sender_emailstring nullable

The same rule as on a creation: an address of the account or its domain. Left out or null, it is left as it is.

reply_to_emailstring nullable

The same. Left out or null, it is left as it is.

subjectstring nullable

Left out or null, it is left as it is.

bodystring nullable

Replaces the whole body. Left out or null, it is left as it is.

dry_runboolean

Validate everything and write nothing.

idempotency_keystring

Replays the answer of an identical call for 24 hours.

Response

The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.

status'ok' required

Changes

No recorded changes to this operation across all 1 revision of this API.