Agents
Turn an agent's inbound face on or off
Gives one agent a separate inbound configuration. Enabling the first time deep-copies the agent into an inbound face; the face’s name and project always track the parent and cannot be set independently.
Disabling is guarded: if numbers are linked or inbound campaigns are running, the request returns 409 CONFIRM_REQUIRED with exactly what would break. Re-send with confirm: true to unlink those numbers and pause those campaigns.
This endpoint is rate-limited more tightly than the rest of the API.
PATCH
/
agent
/
{id}
/
inbound
Turn an agent's inbound face on or off
curl --request PATCH \
--url https://api.vocobase.com/api/v2/agent/{id}/inbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.vocobase.com/api/v2/agent/{id}/inbound"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.vocobase.com/api/v2/agent/{id}/inbound', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vocobase.com/api/v2/agent/{id}/inbound",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/agent/{id}/inbound"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.vocobase.com/api/v2/agent/{id}/inbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/agent/{id}/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"inbound": {
"enabled": true,
"created": true
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "enabled must be a boolean"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "CONFIRM_REQUIRED",
"message": "Turning inbound off will unlink the numbers below and pause the campaigns below. Re-send with confirm: true."
},
"details": {
"linked_numbers": [
{
"id": "pn_1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"phone_number": "+918065480085",
"friendly_name": "Support line"
}
],
"active_inbound_campaigns": []
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}{
"success": false,
"error": {
"code": "INBOUND_DISABLED",
"message": "Inbound is currently disabled"
}
}Authorizations
API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.
Path Parameters
Agent ID. Always the parent — the face is not addressable by its own ID.
Body
application/json
⌘I
Turn an agent's inbound face on or off
curl --request PATCH \
--url https://api.vocobase.com/api/v2/agent/{id}/inbound \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.vocobase.com/api/v2/agent/{id}/inbound"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.vocobase.com/api/v2/agent/{id}/inbound', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vocobase.com/api/v2/agent/{id}/inbound",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/agent/{id}/inbound"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.vocobase.com/api/v2/agent/{id}/inbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/agent/{id}/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"inbound": {
"enabled": true,
"created": true
}
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "enabled must be a boolean"
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found"
}
}{
"success": false,
"error": {
"code": "CONFIRM_REQUIRED",
"message": "Turning inbound off will unlink the numbers below and pause the campaigns below. Re-send with confirm: true."
},
"details": {
"linked_numbers": [
{
"id": "pn_1c2d3e4f-5a6b-7c8d-9e0f-1a2b3c4d5e6f",
"phone_number": "+918065480085",
"friendly_name": "Support line"
}
],
"active_inbound_campaigns": []
}
}{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Retry after 60 seconds."
}
}{
"success": false,
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}{
"success": false,
"error": {
"code": "INBOUND_DISABLED",
"message": "Inbound is currently disabled"
}
}