Create a template
POST
/templatesAuthorization
AuthorizationBearer token · headerrequiredA BillionSend API key (bs_…).
Request body
requiredapplication/jsonnamestringrequiredmin length 1 · max length 200
subjectstring | null"" or null clears the subject
max length 998
htmlstringrequiredStored as sent; the dashboard sanitizes at render
min length 1 · max length 500000
textstring | null"" or null clears the text part
max length 500000
aliasstring | nullCase-sensitive handle, unique per team; GET /templates/{alias} resolves it
min length 1 · max length 100 · matches ^[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
Show propertiesHide properties
Any of:
string
stringstring[]
Array of
stringstringnull
nullvariablesany[]Not supported yet: a non-empty list is a 422
Responses
200
Template created. Templates have no draft/publish cycle: every save is live, so status is always published.
objectstringrequiredAllowed:
templateidstring<uuid>required401
Missing, malformed, unknown or revoked API key
statusCodenumberrequirednamestringrequiredmessagestringrequired409
Alias already in use
statusCodenumberrequirednamestringrequiredmessagestringrequired422
Validation error, including from/reply_to/variables (not supported yet)
statusCodenumberrequirednamestringrequiredmessagestringrequired429
Over the rate limit (rate_limit_exceeded, with Retry-After)
statusCodenumberrequirednamestringrequiredmessagestringrequired