Assign tools to agent
curl --request POST \
--url https://api.omnia-voice.com/api/v1/agents/{id}/tools \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"toolIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({toolIds: ['<string>']})
};
fetch('https://api.omnia-voice.com/api/v1/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnia-voice.com/api/v1/agents/{id}/tools"
payload = { "toolIds": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "<string>",
"assigned": 123,
"alreadyAssigned": 123
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}Tools
Assign tools to agent
Assign one or more tools to an agent
POST
/
agents
/
{id}
/
tools
Assign tools to agent
curl --request POST \
--url https://api.omnia-voice.com/api/v1/agents/{id}/tools \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"toolIds": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({toolIds: ['<string>']})
};
fetch('https://api.omnia-voice.com/api/v1/agents/{id}/tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.omnia-voice.com/api/v1/agents/{id}/tools"
payload = { "toolIds": ["<string>"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "<string>",
"assigned": 123,
"alreadyAssigned": 123
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}{
"error": "Invalid request body",
"details": {
"formErrors": [
"<string>"
],
"fieldErrors": {
"baseUrlPattern": [
"Internal URLs are not allowed"
]
}
}
}Authorizations
API key for authentication
Path Parameters
Agent ID
Body
application/json
Array of tool IDs to assign
Minimum array length:
1⌘I