Rivier/ Reference/ campaigns

Create an email template

post/mail/templates

Create an email template. Variables {{name}} and {{name|fallback}}, conditionals {{#if}} {{else}}, loops {{#each}} and partials {{> name}}; values are escaped for HTML.

Before you call

Credential
Authorization: Bearer $KEY
Scope
campaigns:write
Graphql
Mutation.campaignsMailTemplateCreate
Sdk
mail.templates.create
Cli
mail template-create

Request bodyapplication/json, required

  • namestringrequired
    At most 120 characters.
  • kindstring
    One of: transactional, marketing, partial.
  • languagestring
    en, dv, ar, ...; sets the direction and footer words of group mail At most 20 characters.
  • subjectstring
    At most 998 characters.
  • htmlstring
    At most 1000000 characters.
  • textstring
    At most 1000000 characters.
  • testDataobject
    Sample values used by the preview
  • notestring
    At most 200 characters.
  • sharestring
    organization: every project of the organization can use it One of: project, organization.

Responses

  • 201application/json
    Success
    • 400application/json
      The request was malformed
      • errorstringrequired
      • messagestring
    • 401application/json
      No valid credential
      • errorstringrequired
      • messagestring
    • 403application/json
      The credential lacks the scope, origin or address
      • errorstringrequired
      • messagestring
    • 429application/json
      Over the key's rate limit; see Retry-After
      • errorstringrequired
      • messagestring

    This page as Markdown