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

# Create a Network Route

> Adds a route to a Network. Traffic on the Network to an address in `cidr` goes via `next_hop`. With a tunnel as the next hop, functions on the Network reach the CIDR through the tunnel without a redeploy. A Network holds each CIDR once.



## OpenAPI

````yaml /openapi/source/external/netapps/netapps.json post /network_routes
openapi: 3.1.0
info:
  version: 2.0.0
  title: Telnyx API
  x-latency-category: responsive
  x-endpoint-cost: light
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  license:
    name: MIT
    identifier: MIT
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Networks
    description: Network operations
  - name: Public Internet Gateways
    description: Public Internet Gateway operations
  - name: WireGuard Interfaces
    description: WireGuard Interface operations
  - name: Tunnels
    description: >-
      Tunnels connect a Network to hosts behind a tunnel process within the
      user's network.
  - name: Network Routes
    description: Routes on a Network that send a CIDR to a next hop, such as a tunnel.
  - name: Tailscale Subnet Routers
    description: Tailscale Subnet Router operations
  - name: Virtual Cross Connects
    description: Virtual Cross Connect operations
  - name: Regions
    description: Regions
  - name: Global IPs
    description: Global IPs
paths:
  /network_routes:
    post:
      tags:
        - Network Routes
      summary: Create a Network Route
      description: >-
        Adds a route to a Network. Traffic on the Network to an address in
        `cidr` goes via `next_hop`. With a tunnel as the next hop, functions on
        the Network reach the CIDR through the tunnel without a redeploy. A
        Network holds each CIDR once.
      operationId: CreateNetworkRoute
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetworkRouteCreate'
            example:
              network_id: 91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24
              cidr: 10.20.0.0/16
              next_hop:
                type: tunnel
                id: 62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39
      responses:
        '201':
          description: Created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/NetworkRoute'
              example:
                data:
                  id: e8a2c5d0-3f7b-4a19-b6d2-9c1e0f8a7b53
                  record_type: network_route
                  network_id: 91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24
                  cidr: 10.20.0.0/16
                  next_hop:
                    type: tunnel
                    id: 62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39
                  origin: static
                  status: pending
                  created_at: '2026-10-21T15:04:05.123456Z'
        '404':
          description: 'Not found: no tunnel with the `next_hop.id` exists on the account.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: '10020'
                    title: Resource not found
                    detail: tunnel 62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39 not found
        '409':
          description: 'Conflict: the Network already has a route for this CIDR.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: '10021'
                    title: Resource conflict
                    detail: 'create route: resource already exists'
        '422':
          description: >-
            Unprocessable entity: the body failed validation. `source.pointer`
            names the field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                errors:
                  - code: '10022'
                    title: Unprocessable Entity
                    detail: cidr must be a valid CIDR range (e.g. 10.20.0.0/16)
                    source:
                      pointer: /cidr
        default:
          $ref: '#/components/responses/GenericErrorResponse'
components:
  schemas:
    NetworkRouteCreate:
      type: object
      title: NetworkRouteCreate
      required:
        - network_id
        - cidr
        - next_hop
      properties:
        network_id:
          type: string
          format: uuid
          description: The id of the Network to add the route to.
          example: 91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24
        cidr:
          type: string
          description: >-
            The IPv4 subnet to route, such as a subnet behind the tunnel. It
            must be a canonical CIDR. Default, loopback, link-local, multicast,
            and shared address space (`100.64.0.0/10`) ranges are rejected. So
            are ranges that overlap the Tailscale Subnet Router ranges,
            `172.27.254.0/24` and `198.18.0.0/20`, or a subnet already on the
            Network.
          example: 10.20.0.0/16
        next_hop:
          type: object
          required:
            - type
            - id
          description: Where the Network sends traffic for `cidr`.
          properties:
            type:
              type: string
              enum:
                - tunnel
              description: The type of the next hop.
              example: tunnel
            id:
              type: string
              format: uuid
              description: The id of the tunnel.
              example: 62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39
    NetworkRoute:
      type: object
      title: NetworkRoute
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Identifies the resource.
          example: e8a2c5d0-3f7b-4a19-b6d2-9c1e0f8a7b53
        record_type:
          type: string
          readOnly: true
          description: Identifies the type of the resource.
          example: network_route
        network_id:
          type: string
          format: uuid
          description: The id of the Network the route belongs to.
          example: 91446ee3-5b1c-4f0e-8d2a-6c7e9b0a1f24
        cidr:
          type: string
          description: The IPv4 CIDR the route covers.
          example: 10.20.0.0/16
        next_hop:
          $ref: '#/components/schemas/NetworkRouteNextHop'
        origin:
          type: string
          enum:
            - static
            - attachment
          readOnly: true
          description: >-
            `static` for a route added with `POST /network_routes`, `attachment`
            for a route that another resource installed and removes.
          example: static
        status:
          type: string
          enum:
            - pending
            - active
            - inactive
            - failed
          readOnly: true
          description: >-
            `pending` until Telnyx installs the route on the Network, then
            `active`. `inactive` while a tunnel next hop has no connected
            process. `failed` (Preview, not reported yet) when Telnyx could not
            install the route.
          example: active
        created_at:
          type: string
          format: date-time
          readOnly: true
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created.
          example: '2026-10-21T15:04:05.123456Z'
    Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      type: object
    NetworkRouteNextHop:
      type: object
      title: NetworkRouteNextHop
      required:
        - type
        - id
      description: Where the Network sends traffic for the route's CIDR.
      properties:
        type:
          type: string
          enum:
            - tunnel
            - wireguard_peer
            - wireguard_interface
            - private_wireless_gateway
            - virtual_cross_connect
            - ipsec_tunnel
            - public_internet_gateway
          description: >-
            The type of the next hop. Routes added with `POST /network_routes`
            use `tunnel`. Routes that attachments install carry the attachment's
            type.
          example: tunnel
        id:
          type: string
          format: uuid
          description: The id of the tunnel or attachment.
          example: 62d438d2-8a51-4c5e-9d0c-1f6b2a7e4c39
    Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          additionalProperties: true
      type: object
  responses:
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````