Place an outbound call
POST
/v1/calls
const url = 'https://api.orvoca.com/v1/calls';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent_id":"example","to":"example","from_number_id":"example"}'};
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/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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
agent_id
required
string
to
required
string
from_number_id
string
Example generated
{ "agent_id": "example", "to": "example", "from_number_id": "example"}Responses
Section titled “Responses”Dialling
Media typeapplication/json
object
id
required
string
status
required
string
direction
required
string
from
required
string
to
required
string
provider
required
null for test calls
string | null
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" }}