> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vocobase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List inbound routing decisions

> Returns newest-first decision logs for inbound routing policies, scoped to the authenticated partner. Use these rows to audit webhook status, latency, fallback reasons, transfers, rejections, and AI session creation.



## OpenAPI

````yaml /openapi.json get /inbound-route-decisions
openapi: 3.1.0
info:
  title: Vocobase Partner API
  version: '2.0'
  description: >-
    API for managing voice AI agents, documents, and calls on the Vocobase
    platform.
servers:
  - url: https://api.vocobase.com/api/v2
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Config
    description: >-
      Read and update partner configuration, webhook settings, and telephony
      credentials.
  - name: Agents
    description: Create, read, update, and delete voice AI agents.
  - name: Voices
    description: >-
      List voice tiers, available voices, and stream preview audio for agent
      configuration.
  - name: Documents
    description: Upload, manage, and delete knowledge base documents.
  - name: Agent Documents
    description: Link and unlink documents to agents for knowledge base integration.
  - name: Calls
    description: Initiate outbound calls and view call history.
  - name: Phone Numbers
    description: >-
      Import DIDs, assign agents for inbound routing, and re-sync carrier
      Application bindings.
  - name: Inbound Routing Policies
    description: >-
      Define pre-answer routing decisions for inbound calls before AI sessions
      are created.
  - name: Telephony Connections
    description: Create, list, rename, and disconnect named V2 telephony connections.
  - name: VoiceLink Management
    description: Manage VoiceLink reseller clients, DID mapping, and readiness sync.
  - name: Projects
    description: Organize agents into projects. Every agent belongs to exactly one project.
  - name: Dictionaries
    description: Speech-recognition dictionary CRUD and agent attachment.
  - name: Sessions
    description: Browser-initiated WebRTC voice sessions for in-app voice agents.
paths:
  /inbound-route-decisions:
    get:
      tags:
        - Inbound Routing Policies
      summary: List inbound routing decisions
      description: >-
        Returns newest-first decision logs for inbound routing policies, scoped
        to the authenticated partner. Use these rows to audit webhook status,
        latency, fallback reasons, transfers, rejections, and AI session
        creation.
      operationId: listInboundRouteDecisions
      parameters:
        - name: policy_id
          in: query
          required: false
          schema:
            type: string
          description: Filter by inbound route policy ID.
        - name: phone_number_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Filter by DID/phone-number row ID.
        - name: action
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/InboundRouteAction'
          description: Filter by final policy action.
        - name: provider
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/InboundRouteProvider'
          description: Filter by inbound provider.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 50
          description: Page size. Defaults to 50 and is capped at 200.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Opaque cursor returned by the previous response.
      responses:
        '200':
          description: Inbound route decisions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    type: object
                    properties:
                      decisions:
                        type: array
                        items:
                          $ref: '#/components/schemas/InboundRouteDecision'
                      next_cursor:
                        type:
                          - string
                          - 'null'
              example:
                success: true
                data:
                  decisions:
                    - id: clxdecision000108l5d8p6b2aa
                      policy_id: clxj3rx7z000008l51s9vh3hf
                      phone_number_id: f1a2c3d4-1111-2222-3333-444455556666
                      agent_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      selected_agent_id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                      provider: plivo
                      provider_call_id: a1b2c3d4-5e6f-7890-1234-56789abcde01
                      from_number: '+919999999999'
                      to_number: '+918888888888'
                      action: ANSWER_WITH_AI
                      decision_source: webhook
                      failure_reason: null
                      transfer_to_number: null
                      webhook_status: 200
                      webhook_latency_ms: 184
                      variables:
                        caller_type: known
                      created_session_id: f7a57c89-437a-47ad-94f1-3d5d196ea3d5
                      created_phone_call_id: d29e4f7e-cf91-4972-a2de-d41f0e1eb67d
                      metadata:
                        policy_scope: PHONE_NUMBER
                      created_at: '2026-07-06T10:00:00.000Z'
                  next_cursor: null
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    InboundRouteAction:
      type: string
      description: Action values supported by inbound route policy responses.
      enum:
        - ANSWER_WITH_AI
        - SELECT_AGENT
        - TRANSFER
        - REJECT
    InboundRouteProvider:
      type: string
      description: Inbound provider currently supported by inbound routing policies.
      enum:
        - vobiz
        - plivo
    InboundRouteDecision:
      type: object
      description: Audit row for one resolved inbound route decision.
      properties:
        id:
          type: string
          description: Opaque decision-log ID.
        policy_id:
          type:
            - string
            - 'null'
          description: Policy that produced the decision, if any.
        phone_number_id:
          type:
            - string
            - 'null'
          format: uuid
        agent_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Default agent from the resolved inbound DID context.
        selected_agent_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Selected agent for ANSWER_WITH_AI/SELECT_AGENT outcomes.
        provider:
          $ref: '#/components/schemas/InboundRouteProvider'
        provider_call_id:
          type: string
        from_number:
          type:
            - string
            - 'null'
        to_number:
          type:
            - string
            - 'null'
        action:
          $ref: '#/components/schemas/InboundRouteAction'
        decision_source:
          $ref: '#/components/schemas/InboundRouteDecisionSource'
        failure_reason:
          type:
            - string
            - 'null'
          description: Fallback or destination failure reason, when applicable.
        transfer_to_number:
          type:
            - string
            - 'null'
          description: Destination number for TRANSFER decisions.
        webhook_status:
          type:
            - integer
            - 'null'
          description: HTTP status returned by the policy webhook.
        webhook_latency_ms:
          type:
            - integer
            - 'null'
          description: Elapsed webhook request time in milliseconds.
        variables:
          type:
            - object
            - 'null'
          additionalProperties: true
        created_session_id:
          type:
            - string
            - 'null'
          format: uuid
        created_phone_call_id:
          type:
            - string
            - 'null'
          format: uuid
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
        created_at:
          type: string
          format: date-time
    InboundRouteDecisionSource:
      type: string
      description: Where the final route decision came from.
      enum:
        - webhook
        - status
        - failure_action
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - success
        - error
  responses:
    ValidationError:
      description: Validation error in request body or parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: VALIDATION_ERROR
              message: agent_name is required and must be max 50 characters
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: UNAUTHORIZED
              message: Invalid or missing API key
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key in format: `rg_live_xxxx`. Pass as a Bearer token in the
        Authorization header.

````