Skip to main content
POST
/
v1
/
voiceai
/
tools
Add Tool
curl --request POST \
  --url https://api.example.com/v1/voiceai/tools \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "tool_config": {
    "name": "<string>",
    "description": "<string>",
    "api_schema": {
      "url": "<string>",
      "method": "GET",
      "path_params_schema": {},
      "query_params_schema": {
        "properties": {},
        "required": [
          "<string>"
        ]
      },
      "request_body_schema": {
        "type": "object",
        "description": "",
        "properties": {},
        "required": [
          "<string>"
        ]
      },
      "request_headers": {},
      "content_type": "application/json",
      "auth_connection": {
        "auth_connection_id": "<string>"
      }
    },
    "type": "webhook",
    "response_timeout_secs": 20,
    "disable_interruptions": false,
    "force_pre_tool_speech": false,
    "assignments": [
      {
        "dynamic_variable": "<string>",
        "value_path": "<string>",
        "source": "response"
      }
    ],
    "tool_call_sound": "typing",
    "tool_call_sound_behavior": "auto",
    "dynamic_variables": {
      "dynamic_variable_placeholders": {}
    },
    "execution_mode": "immediate"
  }
}
'
{
  "id": "<string>",
  "tool_config": {
    "name": "<string>",
    "description": "<string>",
    "api_schema": {
      "url": "<string>",
      "method": "GET",
      "path_params_schema": {},
      "query_params_schema": {
        "properties": {},
        "required": [
          "<string>"
        ]
      },
      "request_body_schema": {
        "type": "object",
        "description": "",
        "properties": {},
        "required": [
          "<string>"
        ]
      },
      "request_headers": {},
      "content_type": "application/json",
      "auth_connection": {
        "auth_connection_id": "<string>"
      }
    },
    "type": "webhook",
    "response_timeout_secs": 20,
    "disable_interruptions": false,
    "force_pre_tool_speech": false,
    "assignments": [
      {
        "dynamic_variable": "<string>",
        "value_path": "<string>",
        "source": "response"
      }
    ],
    "tool_call_sound": "typing",
    "tool_call_sound_behavior": "auto",
    "dynamic_variables": {
      "dynamic_variable_placeholders": {}
    },
    "execution_mode": "immediate"
  },
  "access_info": {
    "is_creator": true,
    "creator_name": "<string>",
    "creator_email": "<string>",
    "role": "admin"
  },
  "usage_stats": {
    "total_calls": 0,
    "avg_latency_secs": 123
  }
}

Authorizations

x-api-key
string
header
required

API key for programmatic access

Body

application/json

Request body for creating/updating a tool

tool_config
WebhookToolConfig · object
required

A webhook tool is a tool that calls an external webhook from our server

Response

Successful Response

Response model for a single tool

id
string
required

The tool ID

tool_config
WebhookToolConfig · object
required

A webhook tool is a tool that calls an external webhook from our server

access_info
ResourceAccessInfo · object
required

Access information for this tool

usage_stats
ToolUsageStatsResponseModel · object
required

Usage statistics for this tool