Trillet AI logo

Toggle Autopilot

Toggle the autopilot mode of an existing message flow.

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

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 ID of the message flow where autopilot will be toggled.

stringdefault: s

An optional, empty object as the default body.

Response Fields

_idstring

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

workspaceIdstring

The identifier of the workspace containing the message flow.

namestring

The name of the message flow.

descriptionstring

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

agentstring

The identifier of the agent associated with this message flow.

promptstring

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

initiationMessagestring

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

isActiveboolean

Indicates whether the message flow is currently active.

autopilotboolean

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

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

{
  "_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"
}