Add a custom HTTP action
POST
/v1/tools
const url = 'https://api.orvoca.com/v1/tools';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"http","name":"example","description":"example","config":{"method":"GET","url":"example","body":"example","parameters":[]},"secrets":{"headers":{}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.orvoca.com/v1/tools \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "http", "name": "example", "description": "example", "config": { "method": "GET", "url": "example", "body": "example", "parameters": [] }, "secrets": { "headers": {} } }'Calls your own API during a call. {{name}} in the URL or body is filled from the agent’s arguments, plus {{call.id}}, {{call.from}} and {{call.to}}. Headers are stored encrypted. HTTPS only, 2-second limit. Use POST /v1/tools/{id}/test before adding it to an agent.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
name
required
string
description
required
When the agent should use it, in plain words
string
config
required
object
method
required
string
url
required
string
body
parameters
Array<object>
object
name
required
string
type
required
string
description
required
string
required
boolean
secrets
object
headers
object
key
additional properties
string
Responses
Section titled “Responses”Added
Media typeapplication/json
object
id
required
string
kind
required
string
name
required
Function name the agent calls, e.g. check_order
string
description
required
string | null
config
secret_headers
required
Names of the stored headers; values are never returned
Array<string>
status
required
string
tested_at
required
string | null
created_at
required
string | null
updated_at
required
string | null
Example
{ "kind": "calendar", "status": "active"}Invalid request
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not signed in or bad API key
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not allowed
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}Name taken
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string
Example generated
{ "error": { "code": "example", "message": "example", "param": "example", "request_id": "example" }}