PUT
/
v1
/
api
/
message-flows
/
{id}
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>"
    }
  }
}'
{
  "_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",
  "__v": 0
}

Headers

x-api-key
string
required

API key used for authenticating requests to the API.

x-workspace-id
string
required

Workspace identifier for the API.

Path Parameters

id
string
required

The unique identifier of the message flow to update.

Request Body

description
string

Update the description for this message flow.

toggleAutopilot
boolean

If present and set to true, this toggles the autopilot setting.

settings
object

Configuration settings for the message flow.

Response Fields

_id
string

The unique identifier for the message flow that was updated.

workspaceId
string

The identifier of the workspace where the message flow is configured.

name
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.

direction
string

Indicates the direction of the message flow, such as “bidirectional”.

description
string

The updated description of what the message flow is designed to handle.

agent
string

The identifier of the agent associated with this message flow.

settings
object

The configuration settings for the message flow, detailing updated and existing settings.

responseSettings
object

Settings related to the timing and conditions under which responses are issued within the message flow.

delay
number

The delay in seconds before a response is issued.

workingHours
object

Configuration for working hours during which the message flow is active.

enabled
boolean

Whether working hours are enabled.

start
string

Start time of the working hours.

end
string

End time of the working hours.

timezone
string

Timezone applicable to the working hours.

outOfHoursMessage
string

Message to be delivered outside of working hours.

security
object

Security settings for the message flow, including HIPAA compliance status.

hipaaCompliance
boolean

Indicates if HIPAA compliance is enforced.

emailSettings
object

Email settings for managing email-based message flows.

subjectLine
string

The subject line used for emails sent in this flow.

signature
string

The email signature appended to messages.

prompt
string

The system or initial prompt set for the AI agent in the message flow.

isActive
boolean

Indicates whether the message flow is currently active.

autopilot
boolean

Specifies whether autopilot is enabled or disabled after the update.

messageChannel
string

The type of communication channel used by the message flow, such as “SMS”.

createdAt
string

The timestamp when the message flow was created.

updatedAt
string

The timestamp when the message flow was last updated.

__v
number

The version number of the message flow document, indicating how many times it has been 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",
  "__v": 0
}