Import numbers already on a customer's provider account
POST
/v1/numbers/import
const url = 'https://api.orvoca.com/v1/numbers/import';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"connection_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/import \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "connection_id": "example" }'Adds every voice number on the account that Orvoca does not have yet, and points its inbound calls at Orvoca.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
connection_id
required
string
Example generated
{ "connection_id": "example"}Responses
Section titled “Responses”Import result
Media typeapplication/json
object
imported
required
Array<object>
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
skipped
required
Array<object>
object
e164
required
string
reason
required
string
Example
{ "imported": [ { "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" }}