Create a template
POST
/templatesAutorização
AuthorizationToken Bearer · headerobrigatórioA BillionSend API key (bs_…).
Corpo da requisição
obrigatórioapplication/jsonnamestringobrigatóriocomprimento mín. 1 · comprimento máx. 200
subjectstring | null"" or null clears the subject
comprimento máx. 998
htmlstringobrigatórioStored as sent; the dashboard sanitizes at render
comprimento mín. 1 · comprimento máx. 500000
textstring | null"" or null clears the text part
comprimento máx. 500000
aliasstring | nullCase-sensitive handle, unique per team; GET /templates/{alias} resolves it
comprimento mín. 1 · comprimento máx. 100 · corresponde a ^[A-Za-z0-9][A-Za-z0-9._-]*$
fromstring | nullNot supported yet: any value is a 422
reply_tostring | string[] | nullNot supported yet: any value is a 422
Mostrar propriedadesOcultar propriedades
Pelo menos um de:
string
stringstring[]
Array de
stringstringnull
nullvariablesany[]Not supported yet: a non-empty list is a 422
Respostas
200
Template created. Templates have no draft/publish cycle: every save is live, so status is always published.
objectstringobrigatórioValores permitidos:
templateidstring<uuid>obrigatório401
Missing, malformed, unknown or revoked API key
statusCodenumberobrigatórionamestringobrigatóriomessagestringobrigatório409
Alias already in use
statusCodenumberobrigatórionamestringobrigatóriomessagestringobrigatório422
Validation error, including from/reply_to/variables (not supported yet)
statusCodenumberobrigatórionamestringobrigatóriomessagestringobrigatório429
Over the rate limit (rate_limit_exceeded, with Retry-After)
statusCodenumberobrigatórionamestringobrigatóriomessagestringobrigatório