List tools
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/tools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tools": [
{
"id": "6e2a4c8d-1b3f-4a5c-9d7e-0f1a2b3c4d5e",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"agent_id": null,
"name": "lookup_order",
"description": "Look up an order by its number and return its status.",
"type": "http",
"configs": {
"url": "https://api.example.com/orders",
"method": "GET",
"query_params": [
{
"name": "number",
"value": "{{order_number}}"
}
],
"authentication": {
"type": "bearer",
"token": "vault:orders_api_token"
}
},
"parameters": {
"type": "object",
"required": [
"order_number"
],
"properties": {
"order_number": {
"type": "string",
"description": "The order number the caller reads out."
}
}
},
"parameter_mapping": null,
"hold_message": "One moment while I check that order.",
"hold_messages": null,
"async_config": null,
"session": null,
"updated_at": 1794393600000,
"library_tool_id": null,
"library_revision": null,
"library_channels": null,
"used_by_count": 2
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}Tools
List tools
Returns the project’s tools. Without agent_id the list holds both the project-wide tools and every agent’s private tools. Pass agent_id=null for the project-wide tools only, or an agent id for that agent’s private tools only. To see which tools an agent uses, list that agent’s tools instead.
GET
/
v1
/
projects
/
{projectId}
/
tools
List tools
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/tools"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"tools": [
{
"id": "6e2a4c8d-1b3f-4a5c-9d7e-0f1a2b3c4d5e",
"project_id": "3f6c1a52-8d0e-4b8f-9a51-2c7d4e0b9f13",
"agent_id": null,
"name": "lookup_order",
"description": "Look up an order by its number and return its status.",
"type": "http",
"configs": {
"url": "https://api.example.com/orders",
"method": "GET",
"query_params": [
{
"name": "number",
"value": "{{order_number}}"
}
],
"authentication": {
"type": "bearer",
"token": "vault:orders_api_token"
}
},
"parameters": {
"type": "object",
"required": [
"order_number"
],
"properties": {
"order_number": {
"type": "string",
"description": "The order number the caller reads out."
}
}
},
"parameter_mapping": null,
"hold_message": "One moment while I check that order.",
"hold_messages": null,
"async_config": null,
"session": null,
"updated_at": 1794393600000,
"library_tool_id": null,
"library_revision": null,
"library_channels": null,
"used_by_count": 2
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.