Assign a number to an agent, or switch inbound/outbound
PATCH
/v1/numbers/{id}
const url = 'https://api.orvoca.com/v1/numbers/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent_id":"example","inbound_enabled":true,"outbound_enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.orvoca.com/v1/numbers/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent_id": "example", "inbound_enabled": true, "outbound_enabled": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
agent_id
string | null
inbound_enabled
boolean
outbound_enabled
boolean
Example generated
{ "agent_id": "example", "inbound_enabled": true, "outbound_enabled": true}Responses
Section titled “Responses”Updated
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" }}