Trillet AI logo

Update Message Flow

Update an existing message flow with partial or full settings.

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

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

idstringrequired

The unique identifier of the message flow to update.

Request Body

descriptionstring

Update the description for this message flow.

toggleAutopilotboolean

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

settingsobject

Configuration settings for the message flow.

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. While not specified as updated in the request body, it remains a critical part of the response for context.

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 identifier of the 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 type of communication channel used by the message flow, such as "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": "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"
}