Skip to main content
POST
Create inbound routing policy

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json

Create a webhook-backed inbound routing policy. PHONE_NUMBER requires phone_number_id, AGENT requires agent_id, and PARTNER rejects both target IDs.

scope
enum<string>
required

Policy scope. Runtime resolution priority is PHONE_NUMBER, then AGENT, then PARTNER.

Available options:
PHONE_NUMBER,
AGENT,
PARTNER
name
string
required

Policy label used in partner admin tooling.

Required string length: 1 - 200
webhook_url
string<uri>
required

HTTPS endpoint that receives the inbound.route event.

phone_number_id
string<uuid>

Required when scope is PHONE_NUMBER. Must reference an active inbound-enabled Vobiz or Plivo DID owned by the partner.

agent_id
string<uuid>

Required when scope is AGENT. Must reference an active agent owned by the partner.

enabled
boolean
default:true

When false, the policy is stored but not evaluated.

webhook_secret
string | null
write-only

Optional webhook signing secret. Write-only; never returned.

timeout_ms
integer
default:2000

Policy decision webhook timeout in milliseconds.

Required range: 250 <= x <= 5000
failure_action
null | enum<string>
default:ANSWER_WITH_AI

Fallback action used when the policy webhook times out, fails, or returns an invalid response.

Available options:
ANSWER_WITH_AI,
REJECT
allowed_actions
enum<string>[] | null

Optional allowlist for webhook response actions. If omitted, all four actions are allowed.

Action values supported by inbound route policy responses.

Available options:
ANSWER_WITH_AI,
SELECT_AGENT,
TRANSFER,
REJECT

Response

Policy created.

success
boolean
data
object