Update user-specific SMS notification settings for an automation
curl --request PATCH \
--url https://your-instance.example.com/api/automations/{id}/sms-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"smsNotificationEnabled": true,
"smsNotificationPhoneNumbers": [
"+14155551234",
"+14155555678"
],
"smsNotificationMessage": "New lead pending follow-up.",
"smsNotificationTemplateId": "new-lead-alert"
}
'import requests
url = "https://your-instance.example.com/api/automations/{id}/sms-settings"
payload = {
"smsNotificationEnabled": True,
"smsNotificationPhoneNumbers": ["+14155551234", "+14155555678"],
"smsNotificationMessage": "New lead pending follow-up.",
"smsNotificationTemplateId": "new-lead-alert"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smsNotificationEnabled: true,
smsNotificationPhoneNumbers: ['+14155551234', '+14155555678'],
smsNotificationMessage: 'New lead pending follow-up.',
smsNotificationTemplateId: 'new-lead-alert'
})
};
fetch('https://your-instance.example.com/api/automations/{id}/sms-settings', 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/automations/{id}/sms-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'smsNotificationEnabled' => true,
'smsNotificationPhoneNumbers' => [
'+14155551234',
'+14155555678'
],
'smsNotificationMessage' => 'New lead pending follow-up.',
'smsNotificationTemplateId' => 'new-lead-alert'
]),
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/automations/{id}/sms-settings"
payload := strings.NewReader("{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your-instance.example.com/api/automations/{id}/sms-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/automations/{id}/sms-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "SMS notification settings updated successfully",
"data": {
"automationId": "64d2f9c5e8a1d4e001a0b1c2",
"smsNotification": {
"enabled": true,
"phoneNumbers": [
"+14165550100"
],
"message": "New escalation on lead {{contact.firstName}}",
"templateId": "64a1b2c3d4e5f60012345679"
}
}
}{
"success": false,
"message": "Automation not found"
}Automations
Update user-specific SMS notification settings for an automation
Updates the calling user’s per-automation SMS notification configuration (enabled flag, recipient phone numbers, custom message body, optional template id). Stored on the User document; the Automation itself is not modified.
PATCH
/
api
/
automations
/
{id}
/
sms-settings
Update user-specific SMS notification settings for an automation
curl --request PATCH \
--url https://your-instance.example.com/api/automations/{id}/sms-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"smsNotificationEnabled": true,
"smsNotificationPhoneNumbers": [
"+14155551234",
"+14155555678"
],
"smsNotificationMessage": "New lead pending follow-up.",
"smsNotificationTemplateId": "new-lead-alert"
}
'import requests
url = "https://your-instance.example.com/api/automations/{id}/sms-settings"
payload = {
"smsNotificationEnabled": True,
"smsNotificationPhoneNumbers": ["+14155551234", "+14155555678"],
"smsNotificationMessage": "New lead pending follow-up.",
"smsNotificationTemplateId": "new-lead-alert"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
smsNotificationEnabled: true,
smsNotificationPhoneNumbers: ['+14155551234', '+14155555678'],
smsNotificationMessage: 'New lead pending follow-up.',
smsNotificationTemplateId: 'new-lead-alert'
})
};
fetch('https://your-instance.example.com/api/automations/{id}/sms-settings', 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/automations/{id}/sms-settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'smsNotificationEnabled' => true,
'smsNotificationPhoneNumbers' => [
'+14155551234',
'+14155555678'
],
'smsNotificationMessage' => 'New lead pending follow-up.',
'smsNotificationTemplateId' => 'new-lead-alert'
]),
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/automations/{id}/sms-settings"
payload := strings.NewReader("{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your-instance.example.com/api/automations/{id}/sms-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/automations/{id}/sms-settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"smsNotificationEnabled\": true,\n \"smsNotificationPhoneNumbers\": [\n \"+14155551234\",\n \"+14155555678\"\n ],\n \"smsNotificationMessage\": \"New lead pending follow-up.\",\n \"smsNotificationTemplateId\": \"new-lead-alert\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "SMS notification settings updated successfully",
"data": {
"automationId": "64d2f9c5e8a1d4e001a0b1c2",
"smsNotification": {
"enabled": true,
"phoneNumbers": [
"+14165550100"
],
"message": "New escalation on lead {{contact.firstName}}",
"templateId": "64a1b2c3d4e5f60012345679"
}
}
}{
"success": false,
"message": "Automation not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Master switch for the per-user SMS notification on this automation.
Phone numbers to ping when the automation fires.
Custom body (supports {{contact.firstName}} placeholders); ignored when smsNotificationTemplateId is set.
Template _id whose body is used; mutually exclusive with smsNotificationMessage.
⌘I