PUT
/
v1
/
api
/
call-flows
/
{id}
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>",
  "prompt": "<string>",
  "toggleAutopilot": true,
  "settings": {
    "responseSettings": {
      "delay": 123,
      "workingHours": {
        "enabled": true,
        "start": "<string>",
        "end": "<string>",
        "timezone": "<string>",
        "outOfHoursMessage": "<string>"
      }
    },
    "security": {
      "hipaaCompliance": true,
      "publicAccess": true
    },
    "callSetting": {
      "maxCallDuration": 123,
      "endCallOnSilence": 123
    }
  },
  "webhooks": [
    {
      "name": "<string>",
      "description": "<string>",
      "url": "<string>",
      "method": "<string>",
      "headers": {},
      "variables": [
        {
          "name": "<string>",
          "description": "<string>"
        }
      ]
    }
  ]
}'
{
  "_id": "flowId1",
  "workspaceId": "workspaceIdExample1",
  "name": "Updated Call Flow Name",
  "description": "Updated description for the inbound call flow.",
  "isActive": true,
  "promptType": "flow",
  "settings": {
    "responseSettings": {
      "delay": 5,
      "workingHours": {
        "enabled": true,
        "start": "08:00",
        "end": "20:00",
        "timezone": "America/New_York",
        "outOfHoursMessage": "We are currently closed. Please contact us during business hours."
      }
    },
    "security": {
      "hipaaCompliance": true,
      "publicAccess": false
    },
    "callSetting": {
      "maxCallDuration": 1200,
      "endCallOnSilence": 15
    },
    "webhooks": [
      {
        "name": "Booking",
        "description": "Booking request webhook",
        "url": "https://example.com/webhook/agent",
        "method": "POST",
        "headers": [
          {
            "name": "Authorization",
            "value": "Bearer some-token"
          }
        ],
        "body": "{\n  \"message\": \"{{message}}\"\n}",
        "variables": [
          {
            "name": "message",
            "description": "Notification message to be sent"
          }
        ]
      }
    ]
  },
  "updatedAt": "2025-03-11T14:48:43.061Z"
}

Headers

These endCallOnSilence and maxCallDuration are a must to be sent in order for this API call to be successful.

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”).

prompt
string

New prompt for updated call flow.

toggleAutopilot
boolean

If true, toggles the current autopilot value from on to off and vice versa.

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.

Response Fields

_id
string

The unique identifier for the call flow that has been updated.

workspaceId
string

The identifier of the workspace where the call flow is configured.

name
string

The updated name of the call flow.

description
string

The updated description of what the call flow is designed to handle.

agent
string

The identifier of the agent associated with this call flow.

autopilot
boolean

Indicates whether the autopilot mode for the call flow is enabled or disabled.

isActive
boolean

A boolean indicating whether the call flow is currently active.

promptType
string

The type of prompt used in the call flow, such as “simple” or “complex”.

prompt
string

The primary prompt for user interaction, either simple or complex.

gemini_prompt
string

A sanitized version of the prompt, typically used for structured processing.

These endCallOnSilence and maxCallDuration are a must to be sent in order for this API call to be successful.

settings
object

The configuration settings for the call flow, detailing response settings, security measures, and call settings.

webhooks
array

List of webhooks associated with the call flow. The body will be automatically generated based on the webhook variables.

updatedAt
string

The timestamp when the call flow was last updated.

{
  "_id": "flowId1",
  "workspaceId": "workspaceIdExample1",
  "name": "Updated Call Flow Name",
  "description": "Updated description for the inbound call flow.",
  "isActive": true,
  "promptType": "flow",
  "settings": {
    "responseSettings": {
      "delay": 5,
      "workingHours": {
        "enabled": true,
        "start": "08:00",
        "end": "20:00",
        "timezone": "America/New_York",
        "outOfHoursMessage": "We are currently closed. Please contact us during business hours."
      }
    },
    "security": {
      "hipaaCompliance": true,
      "publicAccess": false
    },
    "callSetting": {
      "maxCallDuration": 1200,
      "endCallOnSilence": 15
    },
    "webhooks": [
      {
        "name": "Booking",
        "description": "Booking request webhook",
        "url": "https://example.com/webhook/agent",
        "method": "POST",
        "headers": [
          {
            "name": "Authorization",
            "value": "Bearer some-token"
          }
        ],
        "body": "{\n  \"message\": \"{{message}}\"\n}",
        "variables": [
          {
            "name": "message",
            "description": "Notification message to be sent"
          }
        ]
      }
    ]
  },
  "updatedAt": "2025-03-11T14:48:43.061Z"
}