Push a tool to live agents
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"agents": [
{
"id": "5c1d9e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f",
"name": "Front desk"
}
],
"skipped": [
{
"id": "8f7e6d5c-4b3a-4c2d-9e1f-0a9b8c7d6e5f",
"name": "Order status line",
"reason": "Task 'check_order' references tool 'lookup_order_v1', which is not attached"
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "publish_capability_required",
"code": "PUBLISH_CAPABILITY_REQUIRED"
}{
"error": "Tool not found"
}Tools
Push a tool to live agents
Puts the tool’s current definition into the published version of every agent that uses it, so live calls get the change without republishing each agent. Drafts and older versions are not touched. An agent whose published version would no longer be valid with the change is skipped and listed in skipped with the reason. Needs the publish permission, which organization API keys carry.
POST
/
v1
/
projects
/
{projectId}
/
tools
/
{id}
/
push
Push a tool to live agents
curl --request POST \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/tools/{id}/push', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"agents": [
{
"id": "5c1d9e2f-3a4b-4c5d-9e6f-7a8b9c0d1e2f",
"name": "Front desk"
}
],
"skipped": [
{
"id": "8f7e6d5c-4b3a-4c2d-9e1f-0a9b8c7d6e5f",
"name": "Order status line",
"reason": "Task 'check_order' references tool 'lookup_order_v1', which is not attached"
}
]
}{
"error": "Invalid or revoked token"
}{
"error": "publish_capability_required",
"code": "PUBLISH_CAPABILITY_REQUIRED"
}{
"error": "Tool not found"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.