curl --request GET \
--url https://api-prod.interactly.ai/assistants/v1/tools/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.interactly.ai/assistants/v1/tools/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.interactly.ai/assistants/v1/tools/{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-prod.interactly.ai/assistants/v1/tools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-prod.interactly.ai/assistants/v1/tools/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-prod.interactly.ai/assistants/v1/tools/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/assistants/v1/tools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "1f7b1b1b1b1b1b1b1b1b1b1b",
"teamId": "3f7b1b1b1b1b1b1b1b1b1b1b",
"type": "function",
"async": false,
"function": {
"name": "getUserDetailsByPhoneNumber",
"description": "Get user details by phone number, Run this tool when you want user details like name, dob etc by their phone number",
"parameters": {
"type": "object",
"properties": {
"dob": {
"type": "string",
"format": "date",
"description": "This is the date of birth of the user.",
"example": "1990-03-08"
},
"phoneNumber": {
"type": "string",
"description": "This is the phone number of the user.",
"example": "+919867543210"
}
},
"required": [
"phoneNumber"
],
"additionalProperties": false
},
"strict": false
},
"messages": [
{
"type": "request-start",
"content": "Please wait while I fetch the details."
}
],
"server": {
"url": "https://api.example.com/v1/getUserDetails",
"timeoutSeconds": 20,
"secret": "my-secret",
"headers": {}
},
"createdAt": "2020-10-05T00:00:00.000Z",
"updatedAt": "2020-10-05T00:00:00.000Z"
}{
"message": "Tool not found!"
}{
"message": "Something went wrong!",
"error": "INTERNAL_ERROR"
}Get Tool
curl --request GET \
--url https://api-prod.interactly.ai/assistants/v1/tools/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.interactly.ai/assistants/v1/tools/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.interactly.ai/assistants/v1/tools/{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-prod.interactly.ai/assistants/v1/tools/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-prod.interactly.ai/assistants/v1/tools/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-prod.interactly.ai/assistants/v1/tools/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/assistants/v1/tools/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "1f7b1b1b1b1b1b1b1b1b1b1b",
"teamId": "3f7b1b1b1b1b1b1b1b1b1b1b",
"type": "function",
"async": false,
"function": {
"name": "getUserDetailsByPhoneNumber",
"description": "Get user details by phone number, Run this tool when you want user details like name, dob etc by their phone number",
"parameters": {
"type": "object",
"properties": {
"dob": {
"type": "string",
"format": "date",
"description": "This is the date of birth of the user.",
"example": "1990-03-08"
},
"phoneNumber": {
"type": "string",
"description": "This is the phone number of the user.",
"example": "+919867543210"
}
},
"required": [
"phoneNumber"
],
"additionalProperties": false
},
"strict": false
},
"messages": [
{
"type": "request-start",
"content": "Please wait while I fetch the details."
}
],
"server": {
"url": "https://api.example.com/v1/getUserDetails",
"timeoutSeconds": 20,
"secret": "my-secret",
"headers": {}
},
"createdAt": "2020-10-05T00:00:00.000Z",
"updatedAt": "2020-10-05T00:00:00.000Z"
}{
"message": "Tool not found!"
}{
"message": "Something went wrong!",
"error": "INTERNAL_ERROR"
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Path Parameters
Response
This is the unique identifier for the tool.
"1f7b1b1b1b1b1b1b1b1b1b1b"
This is the unique identifier for the organization that this tool belongs to.
"3f7b1b1b1b1b1b1b1b1b1b1b"
The type of tool. "function" for Function tool.
function "function"
This determines if the tool is async.
If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
Defaults to synchronous (false).
false
This is the function definition of the tool.
Show child attributes
Show child attributes
These are the messages that will be spoken to the user as the tool is running.
- ToolMessageStart
- ToolMessageComplete
- ToolMessageFailed
- ToolMessageDelayed
Show child attributes
Show child attributes
This is the server that will be hit when this tool is requested by the model.
All requests will be sent with the call object among other things.
Show child attributes
Show child attributes
This is the ISO 8601 date-time string of when the record was created.
"2020-10-05T00:00:00.000Z"
This is the ISO 8601 date-time string of when the record was last updated.
"2020-10-05T00:00:00.000Z"