Templates

Create a template

Email: subject is mandatory and format is one of markdown, html (default) and blocks; with blocks the body is the JSON of an EmailDoc, the same document as the visual editor. WhatsApp and Telegram: format is always text and there is no subject. {{...}} variables are derived from the content and are not declared. The name is unique in the workspace: on a duplicate the response is 409 template_exists with the existing templateId, to reuse or to fix with PATCH. Required scope: templates:write.

post/templates

Request

  • Base URL: https://sending.dev/api/v1
  • URL: https://sending.dev/api/v1/templates
  • Auth: HTTP bearer

Request body

namestring required

Unique within the workspace.

bodystring required

Base content. With format 'blocks' it is the JSON of an EmailDoc (the visual editor document).

channelsstring[]

Channels the template can be used on. Default: ['email'].

format'markdown' | 'html' | 'text' | 'blocks'

Email: markdown, html or blocks (default html). WhatsApp/Telegram: always text.

subjectstring

Required if the template includes the email channel.

Response

Template created.

warningsstring[]

Non-blocking warnings: present only when there is something to report, e.g. {{...}} variables that match no contact field.

Example response

{
  "template": {
    "createdAt": "2026-06-30T12:00:00.000Z",
    "updatedAt": "2026-06-30T12:00:00.000Z"
  }
}

Changes

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