Voice

Create an inbound routing rule

Decide where calls on one number go.

THIS CHANGES WHAT HAPPENS TO REAL CALLERS as soon as it is active. A rule with a lower priority than an existing one takes precedence over it, so creating a rule can silently retire the one that was working.

target_type and ring_strategy are closed to voice's own sets. org_id is absent from the body and pinned from the key.

post/voice/inbound-routing/rules

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/voice/inbound-routing/rules
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

phone_numberstring required

The number this rule applies to.

priorityinteger

Lower wins. Ties are resolved arbitrarily.

namestring nullable
match_conditionsobject

{"always": true} or a {"schedule": {...}} block with days, start_time/end_time as HH:MM, and an IANA timezone.

target_type'ai_agent' | 'department' | 'extension' | 'voicemail' required
target_idstring nullable

Agent id, department or extension - depends on target_type.

ring_strategy'single' | 'round_robin'
queue_max_wait_secondsinteger nullable
is_activeboolean

Response

Successful Response

dataVoicePayload required

One voice object - a collection, an agent, a route, a chat.

Open-shaped: voice adds fields to these bodies on its own release cadence and a dropped-or-added key must not be a 500 in this service.

Changes

No recorded changes to this operation across all 2 revisions of this API.