Aller au contenu
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Update a template

PATCH/templates/{id}
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Paramètres de chemin
idstringrequis

Template id or alias

longueur min 1
Corps de la requête
application/json
namestring
longueur min 1 · longueur max 200
subjectstring | null

"" or null clears the subject

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

null clears the alias

longueur min 1 · longueur max 100 · correspond à ^[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

Afficher les propriétés
Au moins un de :
string
string
string[]
Tableau de string
string
null
null
variablesany[]

Not supported: a non-empty list is a 422

Réponses
200

Template updated (live immediately)

objectstringrequis
Valeurs autorisées :template
idstring<uuid>requis
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequis
namestringrequis
messagestringrequis
404

Not found

statusCodenumberrequis
namestringrequis
messagestringrequis
409

Alias already in use

statusCodenumberrequis
namestringrequis
messagestringrequis
422

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

statusCodenumberrequis
namestringrequis
messagestringrequis
429

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

statusCodenumberrequis
namestringrequis
messagestringrequis
Essayer
Serveur
Autorisation
Paramètres
Corpsapplication/json
Requête
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
  ]
}'
Réponse
{
  "object": "template",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}

Cette page vous a-t-elle été utile ?