Create Call Flow
Create a new call flow with full settings.
Headers
x-api-keystringrequiredAPI key used for authenticating requests to the API.
x-workspace-idstringrequiredWorkspace identifier for the API.
Request Body
namestringrequiredA friendly name for this call flow (e.g., "Customer Support Flow").
directionstringrequiredDirection of the flow. Possible values: "outbound", "bidirectional".
descriptionstringDescription of the call flow (e.g. "Handles inbound support calls").
agentstringID of the agent to associate with this flow. If provided, the system looks for a pending phone number for that agent and activates it.
promptTypestringrequireddefault: simpleOnly "simple" type of prompt configuration is allowed now.
folderIdstringID of the folder to organize this call flow.
isGlobalbooleanWhether this is a global call flow. Only specific workspaces can create global flows.
isPreConfiguredbooleanWhether this call flow is pre-configured. Defaults to false.
preConfiguredWorkspaceIdstringWorkspace ID for pre-configured flows.
welcomeMessagestringWelcome message type. Possible values: "user_initiated", "ai_dynamic", "ai_custom". Defaults to "user_initiated".
customWelcomeMessagestringCustom welcome message text when welcomeMessage is set to "ai_custom" only.
flowDataobjectFlow-based configuration using a node/edge approach for complex call routing.
promptstringA system or initial prompt for the flow. This will be used to create the first prompt version.
isActivebooleanWhether the flow is currently active. Defaults to true.
agentWebhookUrlstringWebhook URL for agent-related events.
inboundWebhookUrlstringWebhook URL for inbound call events.
dynamicVariableCollectionsarrayArray of dynamic variable collections for the call flow.
webhooksarrayArray of webhook configurations for the call flow.
settingsobjectMain configuration object for the call flow.
Response Fields
_idstringThe unique identifier for the newly created call flow.
workspaceIdstringThe identifier of the workspace where the call flow has been created.
folderIdstringThe identifier of the folder where the call flow is organized.
isGlobalbooleanWhether this is a global call flow.
isPreConfiguredbooleanWhether this call flow is pre-configured.
preConfiguredWorkspaceIdstringWorkspace ID for pre-configured flows.
namestringThe name given to the call flow.
directionstringThe direction configuration of the call flow; can be "inbound", "outbound", or "bidirectional".
descriptionstringA description of what the call flow is designed to handle.
agentstringThe identifier of the agent associated with this call flow.
promptTypestringdefault: simpleOnly "simple" prompt types allowed now.
welcomeMessagestringWelcome message type configuration.
customWelcomeMessagestringCustom welcome message text if configured.
flowDataobjectThe configuration of nodes and edges that define the call routing logic within the flow.
nodesarrayDetailed configuration of the nodes within the call flow.
edgesarrayConfigurations of the edges connecting nodes within the call flow.
promptstringThe initial or system prompt used in the call flow.
currentPromptIdstringID of the current active prompt version.
promptVersionsarrayArray of prompt versions with their metadata.
_idstringUnique identifier for the prompt version.
namestringName of the prompt version.
promptstringPrompt content for this version.
metadataobjectAdditional metadata including notes.
gemini_promptstringSanitized version of the prompt for Gemini processing.
isActivebooleanIndicates whether the call flow is currently active or inactive.
agentWebhookUrlstringWebhook URL for agent-related events.
inboundWebhookUrlstringWebhook URL for inbound call events.
dynamicVariableCollectionsarrayArray of dynamic variable collections configured for the call flow.
locationsarrayArray of location objects for visual flow positioning.
webhooksarrayArray of configured webhooks with their complete configuration.
settingsobjectConfiguration settings for various aspects of the call flow, including welcome messages, webhooks, knowledge bases, call settings, and security.
securityobjectSecurity settings with processed values.
hipaaCompliancebooleanHIPAA compliance status (processed from securityOptOut).
publicAccessbooleanPublic access configuration.
createdAtstringTimestamp when the call flow was created.
updatedAtstringTimestamp when the call flow was last updated.
{
"_id": "676b8e123456789012345678",
"workspaceId": "6764d172953253138a3a70f4",
"folderId": null,
"isGlobal": false,
"isPreConfigured": false,
"preConfiguredWorkspaceId": null,
"name": "Customer Support Flow",
"direction": "inbound",
"description": "Handles inbound support calls",
"agent": "676b8e123456789012345679",
"promptType": "simple",
"welcomeMessage": "user_initiated",
"customWelcomeMessage": "",
"flowData": {
"nodes": [
{
"id": "node1",
"type": "start",
"data": {
"prompt": "Welcome to our support line. How can I help you?"
}
}
],
"edges": []
},
"prompt": "Keep the conversation short and friendly.",
"currentPromptId": "676b8e123456789012345680",
"promptVersions": [
{
"_id": "676b8e123456789012345680",
"name": "Prompt Version - 1/15/2025, 3:00:00 PM",
"prompt": "Keep the conversation short and friendly.",
"metadata": {
"notes": ""
},
"createdAt": "2025-01-15T15:00:00.000Z",
"updatedAt": "2025-01-15T15:00:00.000Z"
}
],
"gemini_prompt": "Keep the conversation short and friendly.",
"startNodeId": null,
"isActive": true,
"agentWebhookUrl": "",
"inboundWebhookUrl": "",
"dynamicVariableCollections": [],
"locations": [],
"webhooks": [],
"settings": {
"welcomeMessage": "user_initiated",
"customWelcomeMessage": "",
"enableHumanLikeVoiceAndTone": false,
"welcomeMessageDelay": 0,
"webhooks": {
"agent": "",
"inbound": ""
},
"customerLocation": "new york",
"transfers": [],
"knowledgeBases": [],
"utilizePriorCallsContext": false,
"callSettings": {
"trilletVoiceGuard": true,
"reminderMessages": []
},
"security": {
"hipaaCompliance": false,
"publicAccess": false
}
},
"createdAt": "2025-01-15T15:00:00.000Z",
"updatedAt": "2025-01-15T15:00:00.000Z"
}