Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Update a template

PATCH/templates/{id}
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Path parameters
idstringrequired

Template id or alias

min length 1
Request body
application/json
namestring
min length 1 · max length 200
subjectstring | null

"" or null clears the subject

max length 998
htmlstring
min length 1 · max length 500000
textstring | null
max length 500000
aliasstring | null

null clears the alias

min length 1 · max length 100 · matches ^[A-Za-z0-9][A-Za-z0-9._-]*$
fromstring | null

Not supported yet: any value is a 422

reply_tostring | string[] | null

Not supported yet: any value is a 422

Show properties
Any of:
string
string
string[]
Array of string
string
null
null
variablesany[]

Not supported yet: a non-empty list is a 422

Responses
200

Template updated (live immediately)

objectstringrequired
Allowed:template
idstring<uuid>required
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
404

Not found

statusCodenumberrequired
namestringrequired
messagestringrequired
409

Alias already in use

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error, including from/reply_to/variables (not supported yet)

statusCodenumberrequired
namestringrequired
messagestringrequired
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.billionsend.com/templates/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "subject": "string",
  "html": "string",
  "text": "string",
  "alias": "string",
  "from": "string",
  "reply_to": "string",
  "variables": [
    null
  ]
}'
Response
{
  "object": "template",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Was this page helpful?