Create an email template
Creates an email template of the account: the email a scheduled delivery is sent as, reused by every schedule that names it with email_template_key.
IT SENDS NOTHING. Writing a template puts no mail in anybody's inbox -- only a schedule does -- and it does not count against the daily email budget of the account.
THE SENDER HAS TO BE THE ACCOUNT'S. sender_email and reply_to_email have to be the address of a user of the account or share the domain of one, which is the rule /v1/schedules/create applies and the application does not: a template written through an API key would otherwise send mail as anybody.
THE BODY IS STORED AS IT IS. It is not sanitized: a template is a whole HTML document and the application never paints it -- it travels by email. What is refused is the content the platform blocks for a delivery, the same check a schedule goes through.
PLACEHOLDERS. The subject and the body can carry %%REPORT_TITLE%%, %%CURRENT_PERIOD%%, %%PAST_PERIOD%%, %%EXECUTION_DATE%%, %%CUSTOM_VAR_1%% to %%CUSTOM_VAR_5%%, %%REPORT_LINK%% and %%AI_SUMMARY%% (body only), replaced when the email goes out. %%REPORT_LINK%% is required in the body of a delivery sent in the link format, which /v1/schedules/create checks and this endpoint does not: a template does not know which deliveries will use it.
if_version is not accepted, and the call is never confirmed: its inverse is /v1/email-templates/delete.
Every write endpoint reads dry_run and idempotency_key; see the Write guarantees section of the introduction.
Request
- Base URL: https://api.reportingninja.com/v1
- URL: https://api.reportingninja.com/v1/email-templates/create
- Auth: HTTP bearer
Request body
Response
The call succeeded. This endpoint reports its errors with a real HTTP status, so a 200 always carries status=ok.
Changes
No recorded changes to this operation across all 1 revision of this API.