Trillet AI logo

Create Flow Folder

Create a new flow folder in the specified workspace.

POSThttps://api.trillet.ai/v1/api/flow-folders

Headers

x-workspace-idstringrequired

The ID of the workspace to create the folder in.

Request Body

namestringrequired

The name of the folder (e.g., "My Workflow Folder").

colorstringrequired

The color of the folder, specified as one of the following color names with their corresponding hex codes: blue (#3B82F6), green (#10B981), teal (#14B8A6), purple (#8B5CF6), orange (#F97316), red (#EF4444).

iconstringrequired

The icon identifier for the folder, specified as one of the following: folder, file, phone, headphone, voice, message.

flowTypestringrequired

The type of flow. Possible values: "call" or "message".

Response Fields

_idstring

The unique identifier for the newly created folder.

workspaceIdstring

The identifier of the workspace where the folder has been created.

namestring

The name given to the folder.

colorstring

The color of the folder, as a hex code (e.g., "#3B82F6" for blue).

iconstring

The icon identifier for the folder (e.g., "folder").

flowTypestring

The type of flow, either "call" or "message".

pathwayModelstring

The model type for flows, derived from flowType.

pathwaysarray

An array of flows associated with the folder (initially empty).

createdAtstring

Timestamp when the folder was created (ISO 8601 format).

updatedAtstring

Timestamp when the folder was last updated (ISO 8601 format).

Example Request

{
  "name": "My Workflow Folder",
  "color": "blue",
  "icon": "folder",
  "flowType": "call"
}

Example Response (201 Created)

{
  "_id": "folder123",
  "workspaceId": "workspace456",
  "name": "My Workflow Folder",
  "color": "#3B82F6",
  "icon": "folder",
  "flowType": "call",
  "pathwayModel": "Flow",
  "pathways": [],
  "createdAt": "2023-10-15T09:30:00Z",
  "updatedAt": "2023-10-15T09:30:00Z"
}