Skip to content

Place an outbound call

POST
/v1/calls
curl --request POST \
--url https://api.orvoca.com/v1/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "agent_id": "example", "to": "example", "from_number_id": "example" }'

Dials to from from_number_id, or the agent’s outbound number. Calls to Indian numbers are refused outside 09:00–21:00 IST.

With a test API key nothing is dialled or charged: the call is simulated, ends a few seconds later with a sample transcript, and sends the usual webhooks with data.test: true. A number to call from is optional in test mode.

Media typeapplication/json
object
agent_id
required
string
to
required
string
/^\+[1-9]\d{7,14}$/
from_number_id
string

Example generated

{
"agent_id": "example",
"to": "example",
"from_number_id": "example"
}

Dialling

Media typeapplication/json
object
id
required
string
status
required
string
Allowed values: queued ringing live ended failed
direction
required
string
Allowed values: outbound
from
required
string
to
required
string
provider
required

null for test calls

string | null
Allowed values: plivo vobiz sip
test
required

Placed with a test API key: simulated, never dialled or charged

boolean

Example

{
"status": "queued",
"direction": "outbound",
"provider": "plivo"
}

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"
}
}

No plan minutes or wallet balance left

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"
}
}

Outside calling hours, or the provider refused

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"
}
}

Daily outbound limit reached (new workspaces: 50 a day for 14 days)

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"
}
}