Skip to content
Tools

POSThttps://core-api.heysadie.ai/tools

name body instruction serverUrl success data id tenantId createdAt updatedAt metadata timestamp version path error code message details field

Create tool

Define a new assistant tool that can be executed through structured function-calling. Use this when: - You want the assistant to call an external API using structured logic - You want to define when, how, and what to send to a tool/function ### Fields - `name`: A friendly name for the tool (e.g., "GetMenu", "SubmitReservation") - `body`: The tool function definition, following the function-calling schema. This includes: - `name`: The function name (e.g., "getMenu") - `description`: A short explanation of what the function does - `parameters`: A JSON Schema object describing the expected parameters. Each parameter includes a name, type, and description. **Example:** ```json { "name": "getMenu", "description": "Fetches the current menu for a location", "parameters": { "type": "object", "properties": { "locationId": { "type": "string", "description": "Unique ID of the restaurant location" } }, "required": ["locationId"] } } ``` - `instruction`: A list of step-by-step instructions the assistant should follow before calling the tool. This lets you tightly control the assistant's behavior and validation. **Example:** ```json [ { "step": "check_requirements", "description": "Ensure the user has specified a location" }, { "step": "call_tool", "description": "Invoke the getMenu function with the locationId" }, { "step": "respond", "description": "Summarize the menu results back to the user" } ] ``` - `serverUrl`: The URL endpoint to which the assistant will send the final tool payload (e.g., "https://api.myapp.com/v1/tools/get-menu") This enables deep integration between the assistant's reasoning and your backend systems. ⚠️ All tools are tenant-scoped. Make sure each tool is specific to the use case of your assistant.

Try it in the API Explorer

Example request

Terminal
curl -X POST "https://core-api.heysadie.ai/tools" \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Transfer to contact",
    "serverUrl": "https://your-directory-server.example.com/find-destination",
    "body": {
      "type": "dynamicTransfer",
      "function": {
        "name": "transferToContact",
        "description": "Look up a person by name in the company directory and transfer the caller to them. Use whenever the caller asks to be connected or transferred to a specific person or department.",
        "parameters": {
          "type": "object",
          "properties": {
            "firstName": {
              "type": "string",
              "description": "First name of the contact the caller wants to reach"
            }
          },
          "required": [
            "firstName"
          ]
        }
      },
      "defaultMode": "cold",
      "messages": [
        {
          "type": "request-start",
          "mode": "static",
          "content": "One moment, connecting you now."
        }
      ]
    },
    "instruction": {
      "title": "Transfer caller to a named contact",
      "description": "How to use transferToContact to connect the caller to the right person.",
      "steps": [
        {
          "title": "Get the contact name",
          "action": "Ask who the caller wants to reach and capture their first name.",
          "wait_for_response": true
        },
        {
          "title": "Look up and connect",
          "action": "Call transferToContact with the first name. If several matches come back, read the options to the caller and ask which one, then call it again. If there's no match, tell the caller you couldn't find that person.",
          "wait_for_response": false
        }
      ]
    }
  }'

Authentication

Authenticate with an API key in the Authorization header using the ApiKey scheme — see Authentication for how keys work and where to get them.

Authorizationstringrequired

API key in the ApiKey scheme: ApiKey YOUR_API_KEY. Tenant keys authorize their own tenant; organization keys can act on any tenant in the organization.

X-Tenant-Idstring (uuid)optional

Required when authenticating with an organization key — selects the tenant the request acts on. Omit with tenant keys.

Request

Body application/json · required

nameanyoptional

Friendly name for the tool (e.g., 'CheckAvailability')

bodyanyoptional

The full tool definition. `body.type` is `function`, `dynamicTransfer` or `sendDtmf`. For dynamicTransfer: { type, function, defaultMode?, messages? } (see docs/dynamic-transfer-tool.md). For sendDtmf (press dial-pad digits into the call, e.g. a door intercom's open code): { type, function, digits? | codes? } where `digits` is a single dial code and `codes` maps named codes to digits ({ front_door: '#235' }); one of the two is required, allowed characters 0-9 * #. sendDtmf tools have no server — serverUrl may be omitted.

instructionanyoptional

Structured steps or logic the assistant should follow before invoking the tool

serverUrlanyoptional

The URL endpoint to call when this tool is invoked

Responses

200
successbooleanrequired
dataobjectoptional
Show 8 child properties
idstringrequired
namestringrequired
bodyanyrequired
instructionanyrequired
serverUrlstring | nullrequired
tenantIdstring | nulloptional
createdAtstring (date-time) | string (date) | number | nullrequired
updatedAtstring (date-time) | string (date) | number | nullrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
400
successbooleanrequired
errorobjectoptional
Show 3 child properties
codeenumrequired
Allowed values:"VALIDATION_ERROR"
messagestringrequired
detailsobject[]optional
Show 2 item properties
fieldstringrequired
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
401
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"UNAUTHORIZED"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
403
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"FORBIDDEN"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
404
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"RESOURCE_NOT_FOUND"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional
500
successbooleanrequired
errorobjectoptional
Show 2 child properties
codeenumrequired
Allowed values:"INTERNAL_SERVER_ERROR"
messagestringrequired
metadataobjectoptional
Show 3 child properties
timestampstringrequired
versionstringrequired
pathstringoptional