Rent a number
POST
/v1/numbers
const url = 'https://api.orvoca.com/v1/numbers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connection_id":"example","e164":"example","agent_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/numbers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connection_id": "example", "e164": "example", "agent_id": "example" }'Buys e164 on the connection’s provider account and points it at Orvoca. On an Orvoca connection it costs ₹200/month from the wallet; on your own account your provider bills you.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
connection_id
required
string
e164
required
string
agent_id
string
Example generated
{ "connection_id": "example", "e164": "example", "agent_id": "example"}Responses
Section titled “Responses”Rented
Media typeapplication/json
object
id
required
string
e164
required
string
city
required
string | null
connection
required
object
id
required
string
provider
required
string
owner
required
string
name
required
string
agent_id
required
string | null
inbound_enabled
required
boolean
outbound_enabled
required
boolean
monthly
required
object
amount
required
integer
currency
required
string
renews_at
required
string | null
Example
{ "connection": { "provider": "plivo", "owner": "orvoca" }, "monthly": { "currency": "INR" }}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" }}Number already in use
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" }}