Update

Updates a tool by name or ID.

Authentication

AuthorizationBearer
Bearer authentication header of the form `Bearer <PHONIC_API_KEY>`. Manage your API keys [here](https://phonic.co/api-keys).

Path parameters

nameOrIdstringRequired
The name or the ID of the tool to update.

Query parameters

projectstringOptionalDefaults to main

The name of the project containing the tool. Only used when nameOrId is a name.

Request

This endpoint expects an object.
namestringOptionalformat: "^[a-z0-9_]+$"

The name of the tool. Must be snake_case and unique within the organization.

descriptionstringOptional
A description of what the tool does.
typeenumOptional
The type of tool.
Allowed values:
execution_modeenumOptional
Mode of operation.
Allowed values:
parameterslist of objectsOptional
Array of parameter definitions. When updating `type` or `endpoint_method`, all parameters must include explicit `location` values. For `custom_webhook` tools: `location` is required for POST, defaults to `"query_string"` for GET. For `custom_websocket`, `built_in_transfer_to_phone_number`, and `built_in_transfer_to_agent` tools: `location` must not be specified.
endpoint_methodenumOptional

HTTP method for webhook tools. When changing this value, all parameters must include explicit location values.

Allowed values:
endpoint_urlstringOptionalformat: "uri"
endpoint_headersmap from strings to stringsOptional
endpoint_timeout_msintegerOptional1000-180000Defaults to 5000
tool_call_output_timeout_msintegerOptional1000-180000Defaults to 5000
phone_numberstringOptional

The E.164 formatted phone number to transfer calls to. Required for built_in_transfer_to_phone_number tools.

dtmfstring or nullOptional

DTMF digits to send after the transfer connects (e.g., “1234”). Can be set to null to remove DTMF.

use_agent_phone_numberbooleanOptionalDefaults to true

When true, Phonic will transfer the call using the agent’s phone number. When false, Phonic will transfer the call using the phone number of the party to whom the agent is connected. This is only available for built_in_transfer_to_phone_number tools.

detect_voicemailbooleanOptionalDefaults to false

When true, Phonic will listen in and tell the user if the transfer hits voicemail. This is only available for built_in_transfer_to_phone_number tools when use_agent_phone_number is true.

agents_to_transfer_tolist of stringsOptional
Array of agent names that the LLM can choose from when transferring. All agents must exist in the same project as the tool.
require_speech_before_tool_callbooleanOptional
When true, forces the agent to speak before executing the tool.
wait_for_speech_before_tool_callbooleanOptional

If true, the agent will wait to finish speaking before executing the tool. This is only available for custom_webhook and custom_websocket tools.

forbid_speech_after_tool_callbooleanOptional

When true, forbids the agent from speaking after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools.

allow_tool_chainingbooleanOptionalDefaults to true

When true, allows the agent to chain and execute other tools after executing the tool. Available for custom_context, custom_webhook and custom_websocket tools.

wait_for_responsebooleanOptionalDefaults to false

The agent doesn’t typically wait for the response of async custom_websocket tools. When true, makes the agent wait for a response, not call other tools and inform the user of the result. Only available for async custom_websocket tools.

Response

Success response
successboolean
Whether the tool was updated successfully.

Errors