A valid request URL is required to generate request examples{
"preview": {
"subject": "<string>",
"body": "<string>",
"sample": {
"contact": {
"name": "<string>",
"email": "<string>",
"external_id": "<string>"
},
"customer": {
"name": "<string>"
},
"plan": {
"name": "<string>"
}
}
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Preview a message template
Requires messaging:manage. Renders the stored subject and body against a sample contact and answers with both, plus the sample they were rendered against.
The sample is fixed and fictional. A preview against a real contact would make a text box a way to read one person’s attributes, and a preview whose fields were empty would take the {{else}} branch of every {{if}} — a working preview of a broken template. Every field of the sample is filled in for that reason; what a missing value looks like is what your own {{if}} says it looks like.
A POST on something that writes nothing: rendering is work you ask for rather than a representation of the resource, and a GET whose answer is computed per call is a GET a proxy may cache.
A valid request URL is required to generate request examples{
"preview": {
"subject": "<string>",
"body": "<string>",
"sample": {
"contact": {
"name": "<string>",
"email": "<string>",
"external_id": "<string>"
},
"customer": {
"name": "<string>"
},
"plan": {
"name": "<string>"
}
}
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Autorizações
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
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
Resposta
The rendered message.
Show child attributes
Show child attributes