Update an SMS template
curl --request PUT \
--url https://your-instance.example.com/api/user/sms-templates/{templateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Intro - new lead (v2)",
"template": "Hi {{firstName}}, just checking in — got a sec to chat today?"
}
'import requests
url = "https://your-instance.example.com/api/user/sms-templates/{templateId}"
payload = {
"name": "Intro - new lead (v2)",
"template": "Hi {{firstName}}, just checking in — got a sec to chat today?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Intro - new lead (v2)',
template: 'Hi {{firstName}}, just checking in — got a sec to chat today?'
})
};
fetch('https://your-instance.example.com/api/user/sms-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/user/sms-templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Intro - new lead (v2)',
'template' => 'Hi {{firstName}}, just checking in — got a sec to chat today?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/user/sms-templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://your-instance.example.com/api/user/sms-templates/{templateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/user/sms-templates/{templateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"name": "Tour confirm — Maple Court",
"template": "Hi {{firstName}}! Confirming your tour for {{tour.date}} at {{tour.time}}.",
"type": "sms",
"category": "tours",
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"createdBy": "64a1b2c3d4e5f60012345679",
"createdAt": "2026-05-18T12:34:56.000Z",
"updatedAt": "2026-05-18T12:34:56.000Z"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}User
Update an SMS template
Updates name, body, type, or category on a template the authenticated user owns (or any template, for admins). At least one field must be supplied.
PUT
/
api
/
user
/
sms-templates
/
{templateId}
Update an SMS template
curl --request PUT \
--url https://your-instance.example.com/api/user/sms-templates/{templateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Intro - new lead (v2)",
"template": "Hi {{firstName}}, just checking in — got a sec to chat today?"
}
'import requests
url = "https://your-instance.example.com/api/user/sms-templates/{templateId}"
payload = {
"name": "Intro - new lead (v2)",
"template": "Hi {{firstName}}, just checking in — got a sec to chat today?"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Intro - new lead (v2)',
template: 'Hi {{firstName}}, just checking in — got a sec to chat today?'
})
};
fetch('https://your-instance.example.com/api/user/sms-templates/{templateId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your-instance.example.com/api/user/sms-templates/{templateId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Intro - new lead (v2)',
'template' => 'Hi {{firstName}}, just checking in — got a sec to chat today?'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your-instance.example.com/api/user/sms-templates/{templateId}"
payload := strings.NewReader("{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://your-instance.example.com/api/user/sms-templates/{templateId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/user/sms-templates/{templateId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Intro - new lead (v2)\",\n \"template\": \"Hi {{firstName}}, just checking in — got a sec to chat today?\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "64d2f9c5e8a1d4e001a0b1c2",
"name": "Tour confirm — Maple Court",
"template": "Hi {{firstName}}! Confirming your tour for {{tour.date}} at {{tour.time}}.",
"type": "sms",
"category": "tours",
"organizationId": "64a1b2c3d4e5f60012345678",
"userId": "64a1b2c3d4e5f60012345679",
"createdBy": "64a1b2c3d4e5f60012345679",
"createdAt": "2026-05-18T12:34:56.000Z",
"updatedAt": "2026-05-18T12:34:56.000Z"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}{
"error": "User not found",
"details": "No user with id 64ee9a8b1e7f2a0011223399"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
New human-readable template title; omit to leave unchanged.
New template body with {{firstName}}-style placeholders; omit to leave unchanged.
New template kind (sms, campaign, script, automation); switching to/from automation clears the category field.
New category slug; ignored when the template type is automation.
Response
Template updated
A reusable template (type: sms / campaign / script / automation). Returned by create/update template endpoints.
Template body with {{firstName}}-style placeholders.
Available options:
sms, email, campaign, script, automation ⌘I