Trillet AI logo

Update Message Flow

Update an existing message flow.

PUThttps://api.trillet.ai/v1/api/message-flows/{id}

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

idstringrequired

The unique identifier of the message flow to update.

Request Body

Top-level fields you send replace the stored values; fields you leave out keep their values.

settings is replaced as a whole, not merged. A settings object that only holds the key you want to change drops every other setting (response settings, email settings, knowledge bases, calendar integration and so on). Get the flow first, change what you need, and send the full settings object back with every update.

HIPAA mode is set from settings.security.securityOptOut on every update: true turns it on, and leaving it out turns it off. Send securityOptOut: true each time if the flow must stay in HIPAA mode. settings.security.hipaaCompliance is ignored.

namestring

The flow's name.

descriptionstring

The flow's description.

directionstring

inbound, outbound or bidirectional.

agentstring

ID of the message agent the flow uses.

promptstring

The system prompt or instructions for the AI agent.

initiationMessagestring

The first message the flow sends when it starts a conversation.

messageChannelstring

Twilio-SMS, Telnyx-SMS, Twilio-Email, Meta-Whatsapp, Meta-Facebook, Infobip-Whatsapp or Infobip-Facebook.

isActiveboolean

Whether the flow is active.

autopilotboolean

Whether replies are sent automatically without approval.

toggleAutopilotboolean

If true, flips autopilot to the opposite of its current value (and overrides autopilot).

settingsobject

The flow's full settings. Send it with every update (see the warning above).

Response Fields

_idstring

The unique identifier for the message flow that was updated.

workspaceIdstring

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

namestring

The name of the message flow.

directionstring

Indicates the direction of the message flow, such as "bidirectional".

descriptionstring

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

agentstring

The ID of the message agent associated with this message flow.

settingsobject

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

responseSettingsobject

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

delaynumber

The delay in seconds before a response is issued.

workingHoursobject

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

enabledboolean

Whether working hours are enabled.

startstring

Start time of the working hours.

endstring

End time of the working hours.

timezonestring

Timezone applicable to the working hours.

outOfHoursMessagestring

Message to be delivered outside of working hours.

securityobject

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

hipaaComplianceboolean

Indicates if HIPAA compliance is enforced.

emailSettingsobject

Email settings for managing email-based message flows.

subjectLinestring

The subject line used for emails sent in this flow.

signaturestring

The email signature appended to messages.

promptstring

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

isActiveboolean

Indicates whether the message flow is currently active.

autopilotboolean

Specifies whether autopilot is enabled or disabled after the update.

messageChannelstring

The channel, for example Twilio-SMS.

createdAtstring

The timestamp when the message flow was created.

updatedAtstring

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": "0900",
        "end": "1700",
        "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": "Twilio-SMS",
  "createdAt": "2025-01-02T10:15:00Z",
  "updatedAt": "2025-01-02T10:15:00Z"
}

Last updated on