PATCH
/
v1
/
api
/
flow-folders
/
{folderId}
curl --request PATCH \
  --url https://api.trillet.ai/v1/api/flow-folders/{folderId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "color": "<string>",
  "icon": "<string>",
  "flowType": "<string>"
}'
{
  "_id": "folder123",
  "workspaceId": "workspace456",
  "name": "Updated Workflow Folder",
  "color": "#00FF00",
  "icon": "new-folder-icon",
  "flowType": "call",
  "pathwayModel": "Flow",
  "pathways": ["flow123"],
  "createdAt": "2023-10-15T09:30:00Z",
  "updatedAt": "2023-10-16T12:00:00Z"
}

Path Parameters

folderId
string
required

The unique identifier of the folder to update.

Request Body

name
string

The updated name of the folder (e.g., “Updated 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

The updated type of flow, either “call” or “message”.

Response Fields

_id
string

The unique identifier of the folder.

workspaceId
string

The identifier of the workspace where the folder belongs.

name
string

The updated name of the folder.

color
string

The updated color of the folder, represented as a hex code.

icon
string

The updated icon identifier for the folder.

flowType
string

The updated type of flow, either “call” or “message”.

pathwayModel
string

The model type for flows, derived from flowType.

pathways
array

An array of flow IDs associated with the folder.

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": "Updated Workflow Folder",
  "color": "#00FF00",
  "icon": "new-folder-icon"
}
{
  "_id": "folder123",
  "workspaceId": "workspace456",
  "name": "Updated Workflow Folder",
  "color": "#00FF00",
  "icon": "new-folder-icon",
  "flowType": "call",
  "pathwayModel": "Flow",
  "pathways": ["flow123"],
  "createdAt": "2023-10-15T09:30:00Z",
  "updatedAt": "2023-10-16T12:00:00Z"
}