Create/Update Tool
curl --request POST \
--url https://api.getoutbox.ai/agent/tool/{agent_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"url": "<string>",
"method": "POST",
"type": "custom",
"mcp_tool": "<string>",
"auth_token": "<string>",
"is_async": false,
"is_success": false,
"is_prerun": false,
"is_postrun": false,
"config": {},
"messages": [
{
"content": "<string>"
}
],
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": true
}
]
}
'import requests
url = "https://api.getoutbox.ai/agent/tool/{agent_id}"
payload = {
"name": "<string>",
"id": "<string>",
"description": "<string>",
"url": "<string>",
"method": "POST",
"type": "custom",
"mcp_tool": "<string>",
"auth_token": "<string>",
"is_async": False,
"is_success": False,
"is_prerun": False,
"is_postrun": False,
"config": {},
"messages": [{ "content": "<string>" }],
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": True
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
description: '<string>',
url: '<string>',
method: 'POST',
type: 'custom',
mcp_tool: '<string>',
auth_token: '<string>',
is_async: false,
is_success: false,
is_prerun: false,
is_postrun: false,
config: {},
messages: [{content: '<string>'}],
schema: [
{
id: '<string>',
name: '<string>',
description: '<string>',
type: '<string>',
required: true
}
]
})
};
fetch('https://api.getoutbox.ai/agent/tool/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getoutbox.ai/agent/tool/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'id' => '<string>',
'description' => '<string>',
'url' => '<string>',
'method' => 'POST',
'type' => 'custom',
'mcp_tool' => '<string>',
'auth_token' => '<string>',
'is_async' => false,
'is_success' => false,
'is_prerun' => false,
'is_postrun' => false,
'config' => [
],
'messages' => [
[
'content' => '<string>'
]
],
'schema' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'required' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoutbox.ai/agent/tool/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoutbox.ai/agent/tool/{agent_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/agent/tool/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"builtin_key": "<string>",
"display_name": "<string>",
"mcp_tool": "<string>",
"url": "<string>",
"description": "<string>",
"method": "<string>",
"auth_token": "<string>",
"config": {},
"is_async": true,
"is_success": true,
"is_prerun": true,
"is_postrun": true,
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": true
}
],
"destinations": [
{}
],
"mcp_config_id": "<string>",
"mcp_allowed_tools": [
"<string>"
],
"mcp_toolkit": "<string>",
"icon_url": "<string>",
"application_icon_url": "<string>"
}Agent Tools
Create/Update Tool
Create or update a tool for an agent
POST
/
agent
/
tool
/
{agent_id}
Create/Update Tool
curl --request POST \
--url https://api.getoutbox.ai/agent/tool/{agent_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": "<string>",
"description": "<string>",
"url": "<string>",
"method": "POST",
"type": "custom",
"mcp_tool": "<string>",
"auth_token": "<string>",
"is_async": false,
"is_success": false,
"is_prerun": false,
"is_postrun": false,
"config": {},
"messages": [
{
"content": "<string>"
}
],
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": true
}
]
}
'import requests
url = "https://api.getoutbox.ai/agent/tool/{agent_id}"
payload = {
"name": "<string>",
"id": "<string>",
"description": "<string>",
"url": "<string>",
"method": "POST",
"type": "custom",
"mcp_tool": "<string>",
"auth_token": "<string>",
"is_async": False,
"is_success": False,
"is_prerun": False,
"is_postrun": False,
"config": {},
"messages": [{ "content": "<string>" }],
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": True
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
id: '<string>',
description: '<string>',
url: '<string>',
method: 'POST',
type: 'custom',
mcp_tool: '<string>',
auth_token: '<string>',
is_async: false,
is_success: false,
is_prerun: false,
is_postrun: false,
config: {},
messages: [{content: '<string>'}],
schema: [
{
id: '<string>',
name: '<string>',
description: '<string>',
type: '<string>',
required: true
}
]
})
};
fetch('https://api.getoutbox.ai/agent/tool/{agent_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getoutbox.ai/agent/tool/{agent_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'id' => '<string>',
'description' => '<string>',
'url' => '<string>',
'method' => 'POST',
'type' => 'custom',
'mcp_tool' => '<string>',
'auth_token' => '<string>',
'is_async' => false,
'is_success' => false,
'is_prerun' => false,
'is_postrun' => false,
'config' => [
],
'messages' => [
[
'content' => '<string>'
]
],
'schema' => [
[
'id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'type' => '<string>',
'required' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getoutbox.ai/agent/tool/{agent_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getoutbox.ai/agent/tool/{agent_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/agent/tool/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": \"<string>\",\n \"description\": \"<string>\",\n \"url\": \"<string>\",\n \"method\": \"POST\",\n \"type\": \"custom\",\n \"mcp_tool\": \"<string>\",\n \"auth_token\": \"<string>\",\n \"is_async\": false,\n \"is_success\": false,\n \"is_prerun\": false,\n \"is_postrun\": false,\n \"config\": {},\n \"messages\": [\n {\n \"content\": \"<string>\"\n }\n ],\n \"schema\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"required\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"type": "<string>",
"builtin_key": "<string>",
"display_name": "<string>",
"mcp_tool": "<string>",
"url": "<string>",
"description": "<string>",
"method": "<string>",
"auth_token": "<string>",
"config": {},
"is_async": true,
"is_success": true,
"is_prerun": true,
"is_postrun": true,
"schema": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"type": "<string>",
"required": true
}
],
"destinations": [
{}
],
"mcp_config_id": "<string>",
"mcp_allowed_tools": [
"<string>"
],
"mcp_toolkit": "<string>",
"icon_url": "<string>",
"application_icon_url": "<string>"
}Attach a Built-In Tool
Built-in tools are attached after an agent is created. Settype to builtin and pass the tool’s builtin_key.
{
"type": "builtin",
"builtin_key": "send_sms",
"name": "send_sms",
"description": "Send an SMS to the current contact.",
"config": {},
"is_success": false,
"is_prerun": false,
"is_postrun": false
}
config can pre-fill tool inputs so the agent does not need to supply them. When is_success is true, a successful run of this tool marks the conversation as successful.Body
application/json
Tool configuration
Response
Tool created/updated successfully

