Zum Inhalt springen
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Update a template

PATCH/templates/{id}
Autorisierung
AuthorizationBearer-Token · headererforderlich

A BillionSend API key (bs_…).

Pfadparameter
idstringerforderlich

Template id or alias

min. Länge 1
Request-Body
application/json
namestring
min. Länge 1 · max. Länge 200
subjectstring | null

"" or null clears the subject

max. Länge 998
htmlstring
min. Länge 1 · max. Länge 500000
textstring | null
max. Länge 500000
aliasstring | null

null clears the alias

min. Länge 1 · max. Länge 100 · entspricht ^[A-Za-z0-9][A-Za-z0-9._-]*$
fromstring | null

Not supported: any value is a 422

reply_tostring | string[] | null

Not supported: any value is a 422

Eigenschaften anzeigen
Mindestens eines von:
string
string
string[]
Array von string
string
null
null
variablesany[]

Not supported: a non-empty list is a 422

Antworten
200

Template updated (live immediately)

objectstringerforderlich
Erlaubt:template
idstring<uuid>erforderlich
401

Missing, malformed, unknown or revoked API key

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
404

Not found

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
409

Alias already in use

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
422

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

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
429

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

statusCodenumbererforderlich
namestringerforderlich
messagestringerforderlich
Ausprobieren
Server
Autorisierung
Parameter
Bodyapplication/json
Anfrage
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
  ]
}'
Antwort
{
  "object": "template",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

War diese Seite hilfreich?