curl --request PATCH \
--url https://app.thinnest.ai/api/v1/sms/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dltTemplateId": "1207169876543210999"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dltTemplateId: '1207169876543210999'})
};
fetch('https://app.thinnest.ai/api/v1/sms/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sms/templates/{id}"
payload = { "dltTemplateId": "1207169876543210999" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"name": "booking_link",
"body": "Hi {#var#}, thanks for calling Acme Clinic. Book your visit here: {#var#}",
"dltTemplateId": "1207169876543210999",
"providerTemplateId": null,
"category": "service_implicit",
"agentMaySend": true
}Update SMS Template
Changes any of a template’s fields; what you leave out stays. If an agent sends this template after its calls, a body with a different number of {#var#} is refused until that agent’s follow-up is changed. Needs a full key.
curl --request PATCH \
--url https://app.thinnest.ai/api/v1/sms/templates/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dltTemplateId": "1207169876543210999"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({dltTemplateId: '1207169876543210999'})
};
fetch('https://app.thinnest.ai/api/v1/sms/templates/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.thinnest.ai/api/v1/sms/templates/{id}"
payload = { "dltTemplateId": "1207169876543210999" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "8d2e4f6a-1b3c-4d5e-9f70-a1b2c3d4e5f6",
"name": "booking_link",
"body": "Hi {#var#}, thanks for calling Acme Clinic. Book your visit here: {#var#}",
"dltTemplateId": "1207169876543210999",
"providerTemplateId": null,
"category": "service_implicit",
"agentMaySend": true
}Authorizations
Headers
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.
"org_3fKq9TzQ1mN8vB2xR7cLpA"
Body
Response
The template as saved.