Skip to main content
POST
/
v1
/
bots
/
{bot_uid}
/
tools
Create Tool
curl --request POST \
  --url https://api.openmic.ai/v1/bots/{bot_uid}/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "api_request",
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "method": "get",
  "api_timeout": 2,
  "parameters": {},
  "use_raw_schema": true,
  "static_params": {},
  "speak_during_execution": true,
  "speak_after_execution": true,
  "async": false
}
'
{
  "id": 123,
  "type": "api_request",
  "name": "<string>",
  "description": "<string>",
  "url": "<string>",
  "method": "<string>",
  "api_timeout": 123,
  "parameters": {},
  "use_raw_schema": true,
  "static_params": {},
  "speak_during_execution": true,
  "speak_after_execution": true,
  "async": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header as: Authorization: Bearer <your-api-key>

Path Parameters

bot_uid
string
required

The unique identifier of the bot.

Body

application/json

Create a tool for a bot. Each tool type has different required fields and static_params structure. See the x-tool-examples section for complete examples of each type.

type
enum<string>
required

The type of tool that determines its behavior and required configuration.

Available options:
api_request,
function,
end_call,
transfer_call,
dtmf,
send_sms,
send_email,
call_booking,
check_calendar_availability,
check_working_hours
name
string
required

Tool name (max 255 characters).

Maximum string length: 255
description
string

Description of what the tool does. This is shown to the AI to help it decide when to use the tool.

url
string

API endpoint URL. Required for api_request type.

method
enum<string>

HTTP method for API requests. Defaults to get.

Available options:
get,
post
api_timeout
integer

Request timeout in milliseconds.

Required range: x >= 1
parameters
object

JSON schema defining the tool's input parameters. The AI will extract these from the conversation.

use_raw_schema
boolean

If true, parameters is used as-is without transformation. This setting takes precedence over the type-derived default. Set to true for function type tools.

static_params
object

Static configuration that varies by tool type. See examples below for each type's schema.

speak_during_execution
boolean
default:true

If true, bot speaks a filler message while tool executes.

speak_after_execution
boolean
default:true

If true, bot announces the result after execution.

async
boolean
default:false

If true, tool runs asynchronously without blocking the conversation.

Response

Tool created successfully.

id
integer

Unique numeric ID of the tool.

type
enum<string>

The type of tool that determines its behavior and required configuration.

Available options:
api_request,
function,
end_call,
transfer_call,
dtmf,
send_sms,
send_email,
call_booking,
check_calendar_availability,
check_working_hours
name
string
description
string
url
string
method
string
api_timeout
integer
parameters
object
use_raw_schema
boolean
static_params
object
speak_during_execution
boolean
speak_after_execution
boolean
async
boolean
created_at
string<date-time>
updated_at
string<date-time>