Skip to main content
PATCH
Error

Autorizações

Authorization
string
header
obrigatório

A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.

Cabeçalhos

X-Organization-Id
string

The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.

Parâmetros de caminho

id
string<uuid>
obrigatório

Corpo

application/json
name
string
Maximum string length: 200
category
enum<string>
Opções disponíveis:
marketing,
product_news,
surveys
subject
string

Only on an email template.

Maximum string length: 500
body
string
Maximum string length: 100000
key
string

How your backend addresses this template. An empty string clears it, which a transactional template cannot do — it is addressed by name and may not be a campaign step.

Maximum string length: 100
variables
(string | object)[]

The declaration this body may read — a plain name, or a list with its columns. Changing it writes a new version along with the body, because a variable added and the body that reads it are one edit.

version
integer

Make an earlier version live again. The newer ones stay on the shelf — going forward is the same call with a higher number.

It cannot be combined with an edit to the words: a request that both rewrites and rolls back is one we would have to guess about, and that is a 400.

archived
boolean

true takes it out of the picker, false puts it back. Archiving twice does not move the timestamp.

url
string

Optional, and in_app only. Where the notifications this template produces lead when somebody acts on one.

A path rooted at / or an absolute http/https URL — nothing else, and never a scheme that executes. Refused on email for the same reason a subject is refused on in_app: an email body here is your own text escaped into our shell, with no call to action for a URL to attach to.

Send "" to clear it: leaving a destination alone and removing one are different edits, and a PATCH that omits the field does the first.

Maximum string length: 2048

Resposta

The template.

template
object

The words this product sends, written once and rendered per person — by a campaign, and since 00165 by POST /v1/notifications too, which addresses it by key and supplies its variables. Per environment, so writing it in test and copying it to live is the obvious workflow rather than a rename.