Skip to main content
PATCH
/
v2
/
sms-templates
/
{sms_template_id}
Update an SMS Template
curl --request PATCH \
  --url https://api.example.com/v2/sms-templates/{sms_template_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "body": "<string>",
  "description": "<string>",
  "is_default": true
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "modified_at": "2023-11-07T05:31:56Z",
  "id": "<string>",
  "body": "<string>",
  "character_count": 123,
  "description": "<string>",
  "estimated_segment_count": 123,
  "is_default": true,
  "name": "<string>",
  "object": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sms_template_id
string
required

Body

application/json

Request body for updating an SMS template.

name
string | null

The name of the SMS template.

Maximum string length: 128
body
string | null

The message template body with Jinja2 variables. Plain text only.

Maximum string length: 1600
description
string | null

Description of when/how to use this template.

is_default
boolean | null

Whether this is the default SMS template.

Response

Successful Response

SMS template summary for list views.

created_at
string<date-time>
required
modified_at
string<date-time> | null
required
id
string
required
body
string
required

The message template body with Jinja2 variables. Plain text only.

character_count
integer
required

Approximate character count (before variable substitution)

description
string | null
required

Description of when/how to use this template.

estimated_segment_count
integer
required

Estimated SMS segment count. 160 characters per segment for GSM-7 encoding. Note: Actual count may vary after variable substitution.

is_default
boolean
required

Whether this is the default SMS template.

name
string
required

The name of the SMS template.

object
string
required

String representing the object's type. Objects of the same type share the same value.