Create Flow Folder
Create a new flow folder in the specified workspace.
Headers
x-workspace-idstringrequiredThe ID of the workspace to create the folder in.
Request Body
namestringrequiredThe name of the folder (e.g., "My Workflow Folder").
colorstringrequiredThe 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).
iconstringrequiredThe icon identifier for the folder, specified as one of the following: folder, file, phone, headphone, voice, message.
flowTypestringrequiredThe type of flow. Possible values: "call" or "message".
Response Fields
_idstringThe unique identifier for the newly created folder.
workspaceIdstringThe identifier of the workspace where the folder has been created.
namestringThe name given to the folder.
colorstringThe color of the folder, as a hex code (e.g., "#3B82F6" for blue).
iconstringThe icon identifier for the folder (e.g., "folder").
flowTypestringThe type of flow, either "call" or "message".
pathwayModelstringThe model type for flows, derived from flowType.
pathwaysarrayAn array of flows associated with the folder (initially empty).
createdAtstringTimestamp when the folder was created (ISO 8601 format).
updatedAtstringTimestamp 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"
}