This endpoint allows you to create a new mid call tool that can be used by your AI assistants to interact with external APIs during calls.
Body Parameters
Tool name - must contain only lowercase letters and underscores, and start with a letter (e.g., get_weather
, book_appointment
)
Detailed explanation of when and how the AI should use this tool (max 255 characters)
Valid URL of the API endpoint to call
HTTP method: GET
, POST
, PUT
, PATCH
, or DELETE
Request timeout in seconds (1-30, default: 10)
HTTP headers to send with the request
Parameters that the AI will extract from conversation and send to the endpoint
Parameter name (2-32 chars, must start with letter, can contain letters and underscores)
Parameter type: string
, number
, or boolean
Description to help AI understand how to extract this parameter (3-255 chars)
Response fields
The created tool object
The unique identifier of the tool
Request timeout in seconds
{
"message": "Tool created successfully",
"data": {
"id": 1,
"name": "check_order_status",
"description": "Use this tool to check the status of a customer's order.",
"endpoint": "https://api.yourstore.com/orders/status",
"method": "GET",
"timeout": 10,
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer sk_..."
}
],
"schema": [
{
"name": "order_id",
"type": "string",
"description": "The customer's order ID"
},
{
"name": "order_number",
"type": "number",
"description": "The numeric order number"
},
{
"name": "priority_order",
"type": "boolean",
"description": "Whether this is a priority order"
}
],
"created_at": "2025-10-10T12:00:00.000000Z",
"updated_at": "2025-10-10T12:00:00.000000Z"
}
}
After creating a tool, you need to attach it to an assistant to use it during calls. Tools are managed through the Assistant API:
- Create Assistant - Use the
tool_ids
parameter to attach tools when creating an assistant
- Update Assistant - Use the
tool_ids
parameter to add, remove, or replace tools on an existing assistant