PUT
/
v1
/
api
/
message-flows
/
{id}
/
toggle-autopilot
curl --request PUT \
  --url https://api.trillet.ai/v1/api/message-flows/{id}/toggle-autopilot \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "": "<string>"
}'
{
  "_id": "1234567890abcdef12345678",
  "workspaceId": "abcdef1234567890abcdef12",
  "name": "SampleFlow",
  "description": "Sample description for the flow.",
  "agent": "0987654321fedcba09876543",
  "prompt": "You are a helpful assistant.",
  "initiationMessage": "Hello!",
  "isActive": true,
  "autopilot": true,
  "messageChannel": "SMS",
  "createdAt": "2025-01-01T12:00:00.000Z",
  "updatedAt": "2025-01-15T08:30:00.000Z",
  "__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 ID of the message flow where autopilot will be toggled.

Response Fields

_id
string

The unique identifier for the message flow where autopilot was toggled.

workspaceId
string

The identifier of the workspace containing the message flow.

name
string

The name of the message flow.

description
string

A description of what the message flow is designed to handle.

agent
string

The identifier of the agent associated with this message flow.

prompt
string

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

initiationMessage
string

The initial message that triggers the message flow. This is crucial for the generateMessage functionality.

isActive
boolean

Indicates whether the message flow is currently active.

autopilot
boolean

Shows the current state of autopilot for this message flow after toggling. If true, autopilot is now enabled; if false, it is now disabled.

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 the last time the message flow was updated.

__v
number

The version number of the message flow document, indicating how many times it has been modified.

{
  "_id": "1234567890abcdef12345678",
  "workspaceId": "abcdef1234567890abcdef12",
  "name": "SampleFlow",
  "description": "Sample description for the flow.",
  "agent": "0987654321fedcba09876543",
  "prompt": "You are a helpful assistant.",
  "initiationMessage": "Hello!",
  "isActive": true,
  "autopilot": true,
  "messageChannel": "SMS",
  "createdAt": "2025-01-01T12:00:00.000Z",
  "updatedAt": "2025-01-15T08:30:00.000Z",
  "__v": 0
}