Skip to content

Add a custom HTTP action

POST
/v1/tools
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.

Media typeapplication/json
object
kind
required
string
Allowed values: http
name
required
string
description
required

When the agent should use it, in plain words

string
>= 10 characters <= 500 characters
config
required
object
method
required
string
Allowed values: GET POST PUT PATCH DELETE
url
required
string
<= 2000 characters
body
parameters
Array<object>
default: <= 10 items
object
name
required
string
/^[a-z][a-z0-9_]{0,39}$/
type
required
string
Allowed values: string number boolean
description
required
string
>= 1 characters <= 200 characters
required
boolean
default: true
secrets
object
headers
object
key
additional properties
string
<= 2000 characters

Added

Media typeapplication/json
object
id
required
string
kind
required
string
Allowed values: calendar whatsapp transfer email webhook http
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
Allowed values: active disconnected
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"
}
}