Skip to main content
POST
Create an API tool

Authorizations

x-api-key
string
header
required

Body

application/json
name
string
required
description
string | null
tool_type
enum<string>
default:api_call
Available options:
api_call,
call_transfer
configuration
APICallConfiguration · object | null

Configuration for an API_CALL tool, stored in Tool.configuration.

Supports {{variable}} placeholders in url, headers, and body that are resolved at execution time from the tool's input variables and runtime metadata (via {{metadata.key}}).

transfer_target
TransferTargetInput · object | null

Operator-supplied config for a call_transfer target (ENG, voice).

A transfer target carries either a static destination (E.164 or sip: URI) or a dynamic destination_source (api_tool reference that resolves the destination at transfer time). The two are mutually exclusive. mode is always "cold".

destination validity (E.164 or sip: URI) is enforced at the service layer via :func:~src.custom_tools.api._shared.transfer_target.validate_transfer_target_config so a bad destination surfaces as a clean 422. The label / when-to-use are carried on the Tool's name / description, not here.

response_schema
ResponseFieldSelector · object | null

The projection applied to a tool response.

input_defaults
Input Defaults · object | null
metadata
Metadata · object | null

Response

Successful Response

id
string<uuid>
required
organization_id
string<uuid>
required
name
string
required
description
string | null
required
tool_type
enum<string>
required
Available options:
api_call,
call_transfer
active_revision_id
string<uuid> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
active_revision
ToolRevisionResponse · object | null
metadata
Metadata · object