Skip to content

Rent a number

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

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

Example generated

{
"connection_id": "example",
"e164": "example",
"agent_id": "example"
}

Rented

Media typeapplication/json
object
id
required
string
e164
required
string
city
required
string | null
connection
required
object
id
required
string
provider
required
string
Allowed values: plivo vobiz sip
owner
required
string
Allowed values: orvoca customer
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
Allowed values: INR
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"
}
}