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

# Get routing rule

> Returns one routing rule.



## OpenAPI

````yaml /api-reference/rest/openapi.yaml get /v2/sip/routing-rule/{ruleId}
openapi: 3.1.0
info:
  title: Zero Runtime REST API
  version: '1.0'
  description: >-
    Create, configure, version and deploy agents, and wire SIP telephony to
    them.
servers:
  - url: https://api.zeroruntime.ai
security:
  - token: []
tags:
  - name: Agents
  - name: Versions
  - name: Deployment
  - name: Phone numbers
  - name: Routing rules
  - name: Calls
  - name: Batch calls
  - name: Knowledge bases
  - name: Knowledge base folders
paths:
  /v2/sip/routing-rule/{ruleId}:
    parameters:
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
        example: rr_8k2m1x
    get:
      tags:
        - Routing rules
      summary: Get routing rule
      description: Returns one routing rule.
      responses:
        '200':
          description: The rule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoutingRule'
        '404':
          description: The id isn't yours, isn't v2, or is already deleted.
components:
  schemas:
    RoutingRule:
      allOf:
        - type: object
          properties:
            id:
              type: string
              example: rr_8k2m1x
            type:
              type: string
              enum:
                - inbound
                - outbound
            numbers:
              type: array
              items:
                type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
        - $ref: '#/components/schemas/RoutingRuleInput'
    RoutingRuleInput:
      type: object
      properties:
        name:
          type: string
        phoneNumbers:
          type: array
          items:
            type: string
          description: >-
            E.164 numbers already on your account. Leave it out to attach
            numbers later.
        apiKey:
          type: string
          description: >-
            Optional. On create, leave it out to use the API key of the token
            you call with.
        agentId:
          type: string
          description: Agent to dispatch. Omit to dispatch none.
        agentMetadata:
          type: object
          additionalProperties:
            type: string
          description: Flat string map handed to the agent.
        room:
          $ref: '#/components/schemas/Room'
        includeHeaders:
          type: string
          enum:
            - ALL
            - SIP_X_HEADERS
            - NONE
          default: NONE
        headers:
          type: object
          additionalProperties:
            type: string
          description: Outbound only. Extra SIP headers to send.
        headersToAttributes:
          type: object
          additionalProperties:
            type: string
          description: Inbound only. Maps an incoming header onto a call attribute.
        allowedNumbers:
          type: array
          items:
            type: string
          description: Empty means no restriction.
        allowedIpAddresses:
          type: array
          items:
            type: string
          description: Empty means no restriction.
        tags:
          type: array
          items:
            type: string
        recording:
          type: boolean
          default: false
        dtmf:
          type: boolean
          default: false
        noiseCancellation:
          type: boolean
          default: false
        hidePhoneNumber:
          type: boolean
          default: false
    Room:
      type: object
      default:
        type: dynamic
        prefix: blank
      properties:
        type:
          type: string
          enum:
            - dynamic
            - static
        prefix:
          type: string
          enum:
            - blank
            - participantNumber
            - sipNumber
            - random
        id:
          type: string
          description: Static rooms only.
        pin:
          type: string
          description: Static rooms only.
  securitySchemes:
    token:
      type: apiKey
      in: header
      name: Authorization
      description: Your API token, sent raw (no `Bearer` prefix).
      x-default: <auth-token>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.