Skip to main content
POST
/
v1
/
tools
Create Tool
curl --request POST \
  --url https://api.oneinbox.ai/v1/tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "check_inventory",
  "type": "api_call",
  "description": "Look up inventory by SKU.",
  "url": "https://api.example.com/inventory",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer {{secret}}"
  },
  "parameters": [
    {
      "name": "<string>",
      "required": true,
      "description": "<string>"
    }
  ],
  "run_in_background": false,
  "speak_during_execution": true
}
'
{
  "id": "<string>",
  "name": "<string>",
  "type": "<string>",
  "description": "<string>",
  "url": "<string>",
  "method": "<string>",
  "headers": {},
  "parameters": [
    "<unknown>"
  ],
  "transfer_to": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "run_in_background": false,
  "speak_during_execution": false,
  "extraction_schema": {},
  "messaging_config": {},
  "calendar_config": {}
}

Authorizations

Authorization
string
header
required

Your API key sent as a Bearer credential — Authorization: Bearer <api_key>, where <api_key> starts with oi_sk_ (create one via POST /v1/api-keys). Although the field is labelled 'token', paste your API key here. A dashboard JWT is also accepted on this header for the same endpoints.

Body

application/json
name
string
required
Example:

"check_inventory"

type
enum<string>
required
Available options:
api_call
Example:

"api_call"

description
string
required
Example:

"Look up inventory by SKU."

url
string
required

HTTP endpoint to call during the conversation

Example:

"https://api.example.com/inventory"

method
enum<string>
required
Available options:
GET,
POST,
PUT,
PATCH,
DELETE
Example:

"POST"

headers
object

Static headers sent with every request (e.g. Authorization)

Example:
{ "Authorization": "Bearer {{secret}}" }
parameters
object[]

Fields the agent extracts from the conversation and sends to the endpoint

run_in_background
boolean

Agent keeps talking while the HTTP call executes

Example:

false

speak_during_execution
boolean

Agent says a filler phrase while waiting for the response

Example:

true

Response

Successful Response

id
string
required
name
string
required
type
string
required
description
string | null
required
url
string | null
required
method
string | null
required
headers
Headers · object
required
parameters
any[]
required
transfer_to
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
run_in_background
boolean
default:false
speak_during_execution
boolean
default:false
extraction_schema
Extraction Schema · object
messaging_config
Messaging Config · object
calendar_config
Calendar Config · object