POST
/
v1
/
api
/
flow-folders
Create Flow Folder
curl --request POST \
  --url https://api.trillet.ai/v1/api/flow-folders \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "name": "<string>",
  "color": "<string>",
  "icon": "<string>",
  "flowType": "<string>"
}'
{
  "_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"
}

Headers

x-workspace-id
string
required
The ID of the workspace to create the folder in.

Request Body

name
string
required
The name of the folder (e.g., “My Workflow Folder”).
color
string
required
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).
icon
string
required
The icon identifier for the folder, specified as one of the following: folder, file, phone, headphone, voice, message.
flowType
string
required
The type of flow. Possible values: “call” or “message”.

Response Fields

_id
string
The unique identifier for the newly created folder.
workspaceId
string
The identifier of the workspace where the folder has been created.
name
string
The name given to the folder.
color
string
The color of the folder, as a hex code (e.g., “#3B82F6” for blue).
icon
string
The icon identifier for the folder (e.g., “folder”).
flowType
string
The type of flow, either “call” or “message”.
pathwayModel
string
The model type for flows, derived from flowType.
pathways
array
An array of flows associated with the folder (initially empty).
createdAt
string
Timestamp when the folder was created (ISO 8601 format).
updatedAt
string
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"
}