curl --request POST \
--url https://platform.trylath.com/sms/settings/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quietHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quietHours: {enabled: true, start: '<string>', end: '<string>', timezone: '<string>'},
keywordReplies: {stop: '<string>', help: '<string>', start: '<string>'}
})
};
fetch('https://platform.trylath.com/sms/settings/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/sms/settings/set"
payload = {
"quietHours": {
"enabled": True,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/sms/settings/set"
payload := strings.NewReader("{\n \"quietHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"keywordReplies\": {\n \"stop\": \"<string>\",\n \"help\": \"<string>\",\n \"start\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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))
}{
"activityId": "<string>",
"result": {
"settings": {
"quietHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}sms.settings.set
Changes SMS settings for this environment; keys not mentioned are left alone. Quiet hours hold marketing texts until the window opens in the recipient’s local time rather than dropping them; times are 24-hour HH:MM and the window may wrap midnight, and setting timezone to null clears it, which stops marketing sends while quiet hours are enabled. keywordReplies set what Lath texts back to STOP, HELP and START — null for each means Lath says nothing, which is the default because the carrier answers these itself unless its own automatic opt-out handling is turned off. Setting one without turning that off sends the person two replies. is the only variable, and a reply is billed as the segment it is.
curl --request POST \
--url https://platform.trylath.com/sms/settings/set \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quietHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
quietHours: {enabled: true, start: '<string>', end: '<string>', timezone: '<string>'},
keywordReplies: {stop: '<string>', help: '<string>', start: '<string>'}
})
};
fetch('https://platform.trylath.com/sms/settings/set', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/sms/settings/set"
payload = {
"quietHours": {
"enabled": True,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/sms/settings/set"
payload := strings.NewReader("{\n \"quietHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\"\n },\n \"keywordReplies\": {\n \"stop\": \"<string>\",\n \"help\": \"<string>\",\n \"start\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", 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))
}{
"activityId": "<string>",
"result": {
"settings": {
"quietHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>"
},
"keywordReplies": {
"stop": "<string>",
"help": "<string>",
"start": "<string>"
}
},
"updatedAt": "2023-11-07T05:31:56Z"
}
}Authorizations
A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.
Headers
Replays the stored response for the same key and input; refuses different input.
Body
Was this page helpful?

