Skip to main content
POST
/
mail_templates
/
preview
Preview
curl --request POST \
  --url https://api.sandbox.monite.com/v1/mail_templates/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-monite-entity-id: <x-monite-entity-id>' \
  --header 'x-monite-version: <x-monite-version>' \
  --data '
{
  "body": "<string>",
  "document_type": "receivables_quote",
  "language_code": "ab",
  "subject": "<string>"
}
'
{
  "body_preview": "<string>",
  "subject_preview": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-monite-version
string<date>
required
x-monite-entity-id
string<uuid>
required

The ID of the entity that owns the requested resource.

Example:

"9d2b4c8f-2087-4738-ba91-7359683c49a4"

Body

application/json
body
string
required

Body text of the template

document_type
enum<string>
required

Document type of content

Available options:
receivables_quote,
receivables_invoice,
receivables_paid_invoice,
receivables_credit_note,
receivables_discount_reminder,
receivables_final_reminder,
payables_purchase_order,
payables_notify_approver,
payables_notify_payer
language_code
enum<string>
required

Lowercase ISO code of language

Available options:
ab,
aa,
af,
ak,
sq,
am,
ar,
an,
hy,
av,
ae,
ay,
az,
bm,
ba,
eu,
be,
bn,
bi,
bs,
br,
bg,
my,
ca,
ch,
ce,
ny,
zh,
cu,
cv,
kw,
co,
cr,
hr,
cs,
da,
dv,
nl,
dz,
en,
eo,
et,
ee,
fo,
fj,
fi,
fr,
fy,
ff,
gd,
gl,
lg,
ka,
de,
el,
kl,
gn,
gu,
ht,
ha,
he,
hz,
hi,
ho,
hu,
io,
ig,
id,
ia,
ie,
iu,
ik,
ga,
it,
ja,
jv,
kn,
kr,
ks,
kk,
km,
ki,
rw,
ky,
kv,
kg,
ko,
kj,
ku,
lo,
la,
lv,
li,
ln,
lt,
lu,
lb,
mk,
mg,
ms,
ml,
mt,
gv,
mi,
mr,
mh,
mn,
na,
nv,
nd,
nr,
ng,
ne,
no,
nb,
nn,
ii,
oc,
oj,
om,
os,
pi,
ps,
fa,
pl,
pt,
pa,
qu,
ro,
rm,
rn,
ru,
se,
sm,
sg,
sa,
sc,
sr,
sn,
sd,
si,
sk,
sl,
so,
st,
es,
su,
sw,
ss,
sv,
tl,
ty,
tg,
ta,
tt,
te,
th,
bo,
ti,
to,
ts,
tn,
tr,
tk,
tw,
ug,
uk,
ur,
uz,
ve,
vi,
vo,
wa,
cy,
wo,
xh,
yi,
yo,
za,
zu
subject
string
required

Subject text of the template

Response

Successful Response

body_preview
string
required
subject_preview
string
required