zoxaAI
Homepage
API ReferenceTools

Create a tool

POST /api/v1/tools — create a function/end-call/transfer/calculator/knowledge-base tool.

POST /api/v1/tools

Create a reusable tool. The returned tool_uuid is what agents reference under agent.tools[].

Request body

FieldTypeRequiredNotes
namestring (≤ 255)✓Display name. The LLM sees it as a function name: lowercased, with every run of other characters turned into _ ("Book Slot" → book_slot). A name with no English letters or digits, or longer than 64 characters, gets a short unique suffix ("स्टोर खोजें" → tool_41ac1a6b).
descriptionstring—Helps the LLM decide when to call this tool. Surfaced in the function spec.
categoryenum—One of function, endCall, transferCall, calculator, query, native, integration. Defaults to function. For typed tools, set category to match definition.type (e.g., category: "endCall" with definition.type: "endCall") — this is what the UI does and what GET /tools?category=endCall filters on. native and integration are reserved for future built-in / third-party tools.
iconstring (≤ 50)—Lucide icon name. Defaults to "globe".
icon_colorstring (≤ 7)—Hex color. Defaults to "#3B82F6".
definitiondiscriminated object✓The tool's behavior — see below.

definition shape

definition.type discriminates. Five shapes are supported:

typePurposePage
"function"HTTP API callTool types → HTTP
"endCall"End the call with an optional goodbyeTool types → endCall
"transferCall"Warm/cold transfer to PSTN or SIPTool types → transferCall
"calculator"Built-in math tool, no configTool types → calculator
"query"Knowledge-base retrievalTool types → query

Full sub-config field tables for each type live on the Tool types page.

Response

200 OK. Same shape as a list item from GET /tools.

Examples

HTTP function tool

curl -X POST https://dashboard.zoxa.ai/api/v1/tools \
  -H "X-API-Key: zsk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Lookup order status",
    "description": "Fetches order status from internal API.",
    "category": "function",
    "icon": "package",
    "definition": {
      "schema_version": 1,
      "type": "function",
      "config": {
        "method": "GET",
        "url": "https://api.acme.com/orders/{orderId}",
        "timeout_ms": 5000,
        "parameters": [
          { "name": "orderId", "type": "string", "description": "Order ID", "required": true }
        ]
      }
    }
  }'
const tool = await fetch("https://dashboard.zoxa.ai/api/v1/tools", {
  method: "POST",
  headers: { "X-API-Key": "zsk_...", "Content-Type": "application/json" },
  body: JSON.stringify({
    name: "Lookup order status",
    description: "Fetches order status from internal API.",
    category: "function",
    icon: "package",
    definition: {
      schema_version: 1,
      type: "function",
      config: {
        method: "GET",
        url: "https://api.acme.com/orders/{orderId}",
        timeout_ms: 5000,
        parameters: [
          { name: "orderId", type: "string", description: "Order ID", required: true },
        ],
      },
    },
  }),
}).then((r) => r.json());

console.log("Reference in agent.tools[]:", tool.tool_uuid);
import httpx
tool = httpx.post(
    "https://dashboard.zoxa.ai/api/v1/tools",
    headers={"X-API-Key": "zsk_..."},
    json={
        "name": "Lookup order status",
        "description": "Fetches order status from internal API.",
        "category": "function",
        "icon": "package",
        "definition": {
            "schema_version": 1,
            "type": "function",
            "config": {
                "method": "GET",
                "url": "https://api.acme.com/orders/{orderId}",
                "timeout_ms": 5000,
                "parameters": [{"name": "orderId", "type": "string", "description": "Order ID", "required": True}],
            },
        },
    },
).json()

Errors

StatusdetailWhen
400"No organization selected for the user"Auth missing org.
400"Invalid category '...'. Must be one of: ..."Unknown category.
422arrayDiscriminated definition.type doesn't match a known shape, or sub-config fails validation.

On this page