Trillet AI logo

Create Call Flow

Create a new call flow with full settings.

POSThttps://api.trillet.ai/v1/api/call-flows

Headers

x-api-keystringrequired

API key used for authenticating requests to the API.

x-workspace-idstringrequired

Workspace identifier for the API.

Request Body

namestringrequired

A friendly name for this call flow (e.g., "Customer Support Flow").

directionstringrequired

Direction of the flow. Possible values: "outbound", "bidirectional".

descriptionstring

Description of the call flow (e.g. "Handles inbound support calls").

agentstring

ID 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: simple

Only "simple" type of prompt configuration is allowed now.

folderIdstring

ID of the folder to organize this call flow.

isGlobalboolean

Whether this is a global call flow. Only specific workspaces can create global flows.

isPreConfiguredboolean

Whether this call flow is pre-configured. Defaults to false.

preConfiguredWorkspaceIdstring

Workspace ID for pre-configured flows.

welcomeMessagestring

Welcome message type. Possible values: "user_initiated", "ai_dynamic", "ai_custom". Defaults to "user_initiated".

customWelcomeMessagestring

Custom welcome message text when welcomeMessage is set to "ai_custom" only.

flowDataobject

Flow-based configuration using a node/edge approach for complex call routing.

promptstring

A system or initial prompt for the flow. This will be used to create the first prompt version.

isActiveboolean

Whether the flow is currently active. Defaults to true.

agentWebhookUrlstring

Webhook URL for agent-related events.

inboundWebhookUrlstring

Webhook URL for inbound call events.

dynamicVariableCollectionsarray

Array of dynamic variable collections for the call flow.

webhooksarray

Array of webhook configurations for the call flow.

settingsobject

Main configuration object for the call flow.

Response Fields

_idstring

The unique identifier for the newly created call flow.

workspaceIdstring

The identifier of the workspace where the call flow has been created.

folderIdstring

The identifier of the folder where the call flow is organized.

isGlobalboolean

Whether this is a global call flow.

isPreConfiguredboolean

Whether this call flow is pre-configured.

preConfiguredWorkspaceIdstring

Workspace ID for pre-configured flows.

namestring

The name given to the call flow.

directionstring

The direction configuration of the call flow; can be "inbound", "outbound", or "bidirectional".

descriptionstring

A description of what the call flow is designed to handle.

agentstring

The identifier of the agent associated with this call flow.

promptTypestringdefault: simple

Only "simple" prompt types allowed now.

welcomeMessagestring

Welcome message type configuration.

customWelcomeMessagestring

Custom welcome message text if configured.

flowDataobject

The configuration of nodes and edges that define the call routing logic within the flow.

nodesarray

Detailed configuration of the nodes within the call flow.

edgesarray

Configurations of the edges connecting nodes within the call flow.

promptstring

The initial or system prompt used in the call flow.

currentPromptIdstring

ID of the current active prompt version.

promptVersionsarray

Array of prompt versions with their metadata.

_idstring

Unique identifier for the prompt version.

namestring

Name of the prompt version.

promptstring

Prompt content for this version.

metadataobject

Additional metadata including notes.

gemini_promptstring

Sanitized version of the prompt for Gemini processing.

isActiveboolean

Indicates whether the call flow is currently active or inactive.

agentWebhookUrlstring

Webhook URL for agent-related events.

inboundWebhookUrlstring

Webhook URL for inbound call events.

dynamicVariableCollectionsarray

Array of dynamic variable collections configured for the call flow.

locationsarray

Array of location objects for visual flow positioning.

webhooksarray

Array of configured webhooks with their complete configuration.

settingsobject

Configuration settings for various aspects of the call flow, including welcome messages, webhooks, knowledge bases, call settings, and security.

securityobject

Security settings with processed values.

hipaaComplianceboolean

HIPAA compliance status (processed from securityOptOut).

publicAccessboolean

Public access configuration.

createdAtstring

Timestamp when the call flow was created.

updatedAtstring

Timestamp 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"
}