PUT
/
v1
/
api
/
call-flows
/
{id}
Update Call Flow
curl --request PUT \
  --url https://api.trillet.ai/v1/api/call-flows/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "direction": "<string>",
  "isActive": true,
  "isGlobal": true,
  "promptType": "<string>",
  "prompt": "<string>",
  "welcomeMessage": "<string>",
  "customWelcomeMessage": "<string>",
  "dynamicVariableCollections": [
    {
      "id": "<string>",
      "name": "<string>",
      "isDefault": true,
      "variables": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    }
  ],
  "settings": {
    "enableHumanLikeVoiceAndTone": true,
    "welcomeMessageDelay": 123,
    "customerLocation": "<string>",
    "utilizePriorCallsContext": true,
    "responseSettings": {
      "delay": 123,
      "workingHours": {
        "enabled": true,
        "start": "<string>",
        "end": "<string>",
        "timezone": "<string>",
        "outOfHoursMessage": "<string>"
      }
    },
    "security": {
      "hipaaCompliance": true,
      "publicAccess": true
    },
    "callSetting": {
      "maxCallDuration": 123,
      "endCallOnSilence": 123,
      "trilletVoiceGuard": true,
      "reminderMessages": [
        {}
      ]
    },
    "knowledgeBaseFiles": [
      {
        "filename": "<string>",
        "key": "<string>",
        "url": "<string>"
      }
    ],
    "knowledgeBases": [
      {}
    ],
    "transfers": [
      {}
    ]
  },
  "webhooks": [
    {
      "name": "<string>",
      "description": "<string>",
      "url": "<string>",
      "method": "<string>",
      "headers": {},
      "body": "<string>",
      "variables": [
        {
          "name": "<string>",
          "description": "<string>"
        }
      ],
      "responseVariables": [
        {
          "name": "<string>",
          "path": "<string>",
          "description": "<string>"
        }
      ],
      "isTesting": true,
      "testResponse": "<string>",
      "textToSpeak": "<string>"
    }
  ]
}'
{
  "_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",
  "__v": 0
}

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Path Parameters

id
string
required
The unique ID of the call flow to update.

Request Body

name
string
New name for the flow.
description
string
Updated description for the call flow (e.g., “Updated description for inbound calls”).
direction
string
The direction of the call flow. ‘outbound’ or ‘bidirectional’
isActive
boolean
Whether the call flow is currently active.
isGlobal
boolean
Whether this is a global call flow (requires special permissions).
promptType
string
required
The type of prompt used in the call flow “simple”.
prompt
string
The primary prompt for user interaction (used when promptType is ‘simple’).
welcomeMessage
string
default:"user_initiated"
Type of welcome message for the call flow. Possible values: “user_initiated”, “ai_dynamic”, “ai_custom”. Defaults to “user_initiated”.
customWelcomeMessage
string
Custom welcome message text (used when welcomeMessage is ‘ai_custom’).
dynamicVariableCollections
array
Collections of dynamic variables for the call flow.
settings
object
Configuration settings for the call flow.
webhooks
array
List of webhooks to be added to the call flow. A new webhook will be created for each entry in the array, regardless of the name or if it already exists.
These endCallOnSilence and maxCallDuration settings are recommended to be sent for optimal API performance, though they are not strictly required.

Response Fields

_id
string
The unique identifier for the newly created call flow.
workspaceId
string
The identifier of the workspace where the call flow has been created.
folderId
string
The identifier of the folder where the call flow is organized.
isGlobal
boolean
Whether this is a global call flow.
isPreConfigured
boolean
Whether this call flow is pre-configured.
preConfiguredWorkspaceId
string
Workspace ID for pre-configured flows.
name
string
The name given to the call flow.
direction
string
The direction configuration of the call flow; can be “inbound”, “outbound”, or “bidirectional”.
description
string
A description of what the call flow is designed to handle.
agent
string
The identifier of the agent associated with this call flow.
promptType
string
Indicates whether the call flow uses “simple” or “flow” based configuration.
welcomeMessage
string
Welcome message type configuration.
customWelcomeMessage
string
Custom welcome message text if configured.
flowData
object
The configuration of nodes and edges that define the call routing logic within the flow.
nodes
array
Detailed configuration of the nodes within the call flow.
edges
array
Configurations of the edges connecting nodes within the call flow.
prompt
string
The initial or system prompt used in the call flow.
currentPromptId
string
ID of the current active prompt version.
gemini_prompt
string
Sanitized version of the prompt for Gemini processing.
startNodeId
string
ID of the starting node for flow-based configurations.
isActive
boolean
Indicates whether the call flow is currently active or inactive.
agentWebhookUrl
string
Webhook URL for agent-related events.
inboundWebhookUrl
string
Webhook URL for inbound call events.
dynamicVariableCollections
array
Array of dynamic variable collections configured for the call flow.
locations
array
Array of location objects for visual flow positioning.
webhooks
array
Array of configured webhooks with their complete configuration.
settings
object
Configuration settings for various aspects of the call flow, including welcome messages, webhooks, knowledge bases, call settings, and security.
security
object
Security settings with processed values.
hipaaCompliance
boolean
HIPAA compliance status (processed from securityOptOut).
publicAccess
boolean
Public access configuration.
createdAt
string
Timestamp when the call flow was created.
updatedAt
string
Timestamp when the call flow was last updated.
__v
number
The version number of the call flow document.
{
  "_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",
  "__v": 0
}