Update Message Flow
curl --request PUT \
--url https://api.trillet.ai/v1/api/message-flows/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"description": "<string>",
"toggleAutopilot": true,
"settings": {
"responseSettings": {
"delay": 123,
"workingHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>",
"outOfHoursMessage": "<string>"
}
},
"security": {
"hipaaCompliance": true
},
"emailSettings": {
"subjectLine": "<string>",
"signature": "<string>"
}
}
}
'import requests
url = "https://api.trillet.ai/v1/api/message-flows/{id}"
payload = {
"description": "<string>",
"toggleAutopilot": True,
"settings": {
"responseSettings": {
"delay": 123,
"workingHours": {
"enabled": True,
"start": "<string>",
"end": "<string>",
"timezone": "<string>",
"outOfHoursMessage": "<string>"
}
},
"security": { "hipaaCompliance": True },
"emailSettings": {
"subjectLine": "<string>",
"signature": "<string>"
}
}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
toggleAutopilot: true,
settings: {
responseSettings: {
delay: 123,
workingHours: {
enabled: true,
start: '<string>',
end: '<string>',
timezone: '<string>',
outOfHoursMessage: '<string>'
}
},
security: {hipaaCompliance: true},
emailSettings: {subjectLine: '<string>', signature: '<string>'}
}
})
};
fetch('https://api.trillet.ai/v1/api/message-flows/{id}', 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://api.trillet.ai/v1/api/message-flows/{id}",
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([
'description' => '<string>',
'toggleAutopilot' => true,
'settings' => [
'responseSettings' => [
'delay' => 123,
'workingHours' => [
'enabled' => true,
'start' => '<string>',
'end' => '<string>',
'timezone' => '<string>',
'outOfHoursMessage' => '<string>'
]
],
'security' => [
'hipaaCompliance' => true
],
'emailSettings' => [
'subjectLine' => '<string>',
'signature' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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://api.trillet.ai/v1/api/message-flows/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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://api.trillet.ai/v1/api/message-flows/{id}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/message-flows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "exampleId1",
"workspaceId": "exampleWorkspaceId1",
"name": "New Years Sale",
"direction": "bidirectional",
"description": "Handles customer support inquiries via SMS",
"agent": "exampleAgentId1",
"settings": {
"responseSettings": {
"delay": 0,
"workingHours": {
"enabled": false,
"start": "09:00",
"end": "17:00",
"timezone": "UTC",
"outOfHoursMessage": ""
}
},
"security": {
"hipaaCompliance": false
},
"emailSettings": {
"subjectLine": "Follow Up on Your Inquiry",
"signature": "Regards"
}
},
"prompt": "You are a helpful AI that responds to user inquiries.",
"isActive": true,
"autopilot": true,
"messageChannel": "SMS",
"createdAt": "2025-01-02T10:15:00Z",
"updatedAt": "2025-01-02T10:15:00Z"
}
Message Flows
Update Message Flow
Update an existing message flow with partial or full settings.
PUT
/
v1
/
api
/
message-flows
/
{id}
Update Message Flow
curl --request PUT \
--url https://api.trillet.ai/v1/api/message-flows/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-workspace-id: <x-workspace-id>' \
--data '
{
"description": "<string>",
"toggleAutopilot": true,
"settings": {
"responseSettings": {
"delay": 123,
"workingHours": {
"enabled": true,
"start": "<string>",
"end": "<string>",
"timezone": "<string>",
"outOfHoursMessage": "<string>"
}
},
"security": {
"hipaaCompliance": true
},
"emailSettings": {
"subjectLine": "<string>",
"signature": "<string>"
}
}
}
'import requests
url = "https://api.trillet.ai/v1/api/message-flows/{id}"
payload = {
"description": "<string>",
"toggleAutopilot": True,
"settings": {
"responseSettings": {
"delay": 123,
"workingHours": {
"enabled": True,
"start": "<string>",
"end": "<string>",
"timezone": "<string>",
"outOfHoursMessage": "<string>"
}
},
"security": { "hipaaCompliance": True },
"emailSettings": {
"subjectLine": "<string>",
"signature": "<string>"
}
}
}
headers = {
"x-api-key": "<api-key>",
"x-workspace-id": "<x-workspace-id>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-api-key': '<api-key>',
'x-workspace-id': '<x-workspace-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
toggleAutopilot: true,
settings: {
responseSettings: {
delay: 123,
workingHours: {
enabled: true,
start: '<string>',
end: '<string>',
timezone: '<string>',
outOfHoursMessage: '<string>'
}
},
security: {hipaaCompliance: true},
emailSettings: {subjectLine: '<string>', signature: '<string>'}
}
})
};
fetch('https://api.trillet.ai/v1/api/message-flows/{id}', 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://api.trillet.ai/v1/api/message-flows/{id}",
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([
'description' => '<string>',
'toggleAutopilot' => true,
'settings' => [
'responseSettings' => [
'delay' => 123,
'workingHours' => [
'enabled' => true,
'start' => '<string>',
'end' => '<string>',
'timezone' => '<string>',
'outOfHoursMessage' => '<string>'
]
],
'security' => [
'hipaaCompliance' => true
],
'emailSettings' => [
'subjectLine' => '<string>',
'signature' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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://api.trillet.ai/v1/api/message-flows/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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://api.trillet.ai/v1/api/message-flows/{id}")
.header("x-api-key", "<api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trillet.ai/v1/api/message-flows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"toggleAutopilot\": true,\n \"settings\": {\n \"responseSettings\": {\n \"delay\": 123,\n \"workingHours\": {\n \"enabled\": true,\n \"start\": \"<string>\",\n \"end\": \"<string>\",\n \"timezone\": \"<string>\",\n \"outOfHoursMessage\": \"<string>\"\n }\n },\n \"security\": {\n \"hipaaCompliance\": true\n },\n \"emailSettings\": {\n \"subjectLine\": \"<string>\",\n \"signature\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"_id": "exampleId1",
"workspaceId": "exampleWorkspaceId1",
"name": "New Years Sale",
"direction": "bidirectional",
"description": "Handles customer support inquiries via SMS",
"agent": "exampleAgentId1",
"settings": {
"responseSettings": {
"delay": 0,
"workingHours": {
"enabled": false,
"start": "09:00",
"end": "17:00",
"timezone": "UTC",
"outOfHoursMessage": ""
}
},
"security": {
"hipaaCompliance": false
},
"emailSettings": {
"subjectLine": "Follow Up on Your Inquiry",
"signature": "Regards"
}
},
"prompt": "You are a helpful AI that responds to user inquiries.",
"isActive": true,
"autopilot": true,
"messageChannel": "SMS",
"createdAt": "2025-01-02T10:15:00Z",
"updatedAt": "2025-01-02T10:15:00Z"
}
Headers
string
required
API key used for authenticating requests to the API.
string
required
Workspace identifier for the API.
Path Parameters
string
required
The unique identifier of the message flow to update.
Request Body
string
Update the description for this message flow.
boolean
If present and set to true, this toggles the autopilot setting.
object
Configuration settings for the message flow.
Show settings
Show settings
object
Show responseSettings
Show responseSettings
number
Delay (in seconds) before responding.
Response Fields
string
The unique identifier for the message flow that was updated.
string
The identifier of the workspace where the message flow is configured.
string
The name of the message flow. While not specified as updated in the request body, it remains a critical part of the response for context.
string
Indicates the direction of the message flow, such as “bidirectional”.
string
The updated description of what the message flow is designed to handle.
string
The identifier of the agent associated with this message flow.
object
The configuration settings for the message flow, detailing updated and existing settings.
object
Settings related to the timing and conditions under which responses are issued within the message flow.
number
The delay in seconds before a response is issued.
object
object
Security settings for the message flow, including HIPAA compliance status.
boolean
Indicates if HIPAA compliance is enforced.
string
The system or initial prompt set for the AI agent in the message flow.
boolean
Indicates whether the message flow is currently active.
boolean
Specifies whether autopilot is enabled or disabled after the update.
string
The type of communication channel used by the message flow, such as “SMS”.
string
The timestamp when the message flow was created.
string
The timestamp when the message flow was last updated.
{
"_id": "exampleId1",
"workspaceId": "exampleWorkspaceId1",
"name": "New Years Sale",
"direction": "bidirectional",
"description": "Handles customer support inquiries via SMS",
"agent": "exampleAgentId1",
"settings": {
"responseSettings": {
"delay": 0,
"workingHours": {
"enabled": false,
"start": "09:00",
"end": "17:00",
"timezone": "UTC",
"outOfHoursMessage": ""
}
},
"security": {
"hipaaCompliance": false
},
"emailSettings": {
"subjectLine": "Follow Up on Your Inquiry",
"signature": "Regards"
}
},
"prompt": "You are a helpful AI that responds to user inquiries.",
"isActive": true,
"autopilot": true,
"messageChannel": "SMS",
"createdAt": "2025-01-02T10:15:00Z",
"updatedAt": "2025-01-02T10:15:00Z"
}
⌘I
