Trillet AI logo

Update Call Flow

Update an existing call flow.

PUThttps://api.trillet.ai/v1/api/call-flows/{id}

Headers

x-workspace-idstringrequired

Workspace identifier for the API.

Path Parameters

idstringrequired

The unique ID of the call flow to update.

Request Body

namestring

New name for the flow.

descriptionstring

Updated description for the call flow (e.g., "Updated description for inbound calls").

directionstring

The direction of the call flow. 'outbound' or 'bidirectional'

isActiveboolean

Whether the call flow is currently active.

isGlobalboolean

Whether this is a global call flow (requires special permissions).

promptTypestring

The type of prompt used in the call flow "simple".

promptstring

The primary prompt for user interaction (used when promptType is 'simple').

welcomeMessagestring

A shortcut that gives both directions, Inbound and Outbound, the same greeting type. For updates, prefer settings.welcomeMessageConfig: it can change one direction at a time and covers every greeting option. The value is case-sensitive:

  • aiFirst or ai_dynamic: the AI writes the greeting. Saved as aiFirst (AI Generated in the editor).
  • customMessage or ai_custom: the agent opens with the text in customWelcomeMessage. Saved as customMessage (Custom Message in the editor).
  • userFirst or user_initiated: the agent waits for the caller to speak first. Saved as userFirst (Wait for Caller in the editor).

Any other value returns 400 with code: "GREETING_TYPE_INVALID", and the flow is not changed.

The shortcut is saved into settings.welcomeMessageConfig, so welcomeMessage and customWelcomeMessage are not stored. You can also send both fields inside settings. If you send a field in both places, the top-level value wins. If the request also includes settings.welcomeMessageConfig, the shortcut is ignored.

If the shortcut fields you send at the top level, or inside settings, all have exactly the values the flow already has in that place, they are ignored. Some older flows still return these fields, so sending a Get Call Flow response back unchanged does not change the greeting, as long as the flow has no unpublished changes from the call flow editor (see the Note below). To change it, send a different value or use settings.welcomeMessageConfig.

customWelcomeMessagestring

The text the agent says for a customMessage greeting, saved as customMessage in both directions. If you send non-blank text without welcomeMessage, the greeting type is set to customMessage. If you send welcomeMessage: "customMessage" without this field, each direction keeps the text it already has.

When a direction's greeting type is customMessage, its text must not be blank. Otherwise the request returns 400 with code: "GREETING_TEXT_REQUIRED", and the flow is not changed.

dynamicVariableCollectionsarray

Collections of dynamic variables for the call flow.

settingsobject

Configuration settings for the call flow.

webhooksarray

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.

A greeting set here is used from the flow's next call; nothing has to be published. If the flow has unpublished changes from the call flow editor, the editor and Get Call Flow keep showing that draft's greeting, and publishing the draft replaces the greeting you set here. Sending a Get Call Flow response back while such changes exist replaces the live greeting with the draft's, including one you set through the API.

Dashboard test calls also use the draft's greeting until the draft is published or discarded. Demo links marked Draft always use their draft's greeting. Calls received on the flow's phone number, calls the flow places and other Web SDK calls use the greeting set here.

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.

promptTypestring

Indicates whether the call flow uses "simple" or "flow" based configuration.

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.

gemini_promptstring

Sanitized version of the prompt for Gemini processing.

startNodeIdstring

ID of the starting node for flow-based configurations.

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.

welcomeMessageConfigobject

The greeting for each direction, with selected, customMessage, aiGreetingPrompt, userFirstFallbackDelaySeconds and userFirstFallbackMessage. Some flows can be missing a direction, a field, or the whole object; a missing selected means aiFirst.

Inboundobject

The greeting for calls received on the flow's phone number.

Outboundobject

The greeting for calls the flow places and for web calls made with the Web SDK.

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.

Change only the inbound greeting
{
  "settings": {
    "welcomeMessageConfig": {
      "Inbound": {
        "selected": "customMessage",
        "customMessage": "Thanks for calling Acme Plumbing, how can I help you?"
      }
    }
  }
}
Wait for the caller on inbound calls
{
  "settings": {
    "welcomeMessageConfig": {
      "Inbound": {
        "selected": "userFirst",
        "userFirstFallbackDelaySeconds": 8,
        "userFirstFallbackMessage": "Hi, you've reached Acme Plumbing. How can I help you today?"
      }
    }
  }
}
Shortcut
{
  "welcomeMessage": "customMessage",
  "customWelcomeMessage": "Thanks for calling Acme Plumbing, how can I help you?"
}
{
  "_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",
  "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": {
    "welcomeMessageConfig": {
      "Inbound": {
        "aiGreetingPrompt": "",
        "customMessage": "Thanks for calling Acme Plumbing, how can I help you?",
        "selected": "customMessage",
        "userFirstFallbackDelaySeconds": 10,
        "userFirstFallbackMessage": ""
      },
      "Outbound": {
        "aiGreetingPrompt": "",
        "customMessage": "",
        "selected": "aiFirst",
        "userFirstFallbackDelaySeconds": 10,
        "userFirstFallbackMessage": ""
      }
    },
    "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"
}