RapidAPI Routes API

Endpoints for configuring request routing rules that determine how incoming API requests are forwarded to backend services.

Operations 4

GET /gateways/{gatewayId}/routes List routes #
POST /gateways/{gatewayId}/routes Create a route #
PUT /gateways/{gatewayId}/routes/{routeId} Update a route #
DELETE /gateways/{gatewayId}/routes/{routeId} Delete a route #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/rapidapi-routes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

rapidapi-routes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RapidAPI Gateway Routes API
  description: The RapidAPI Gateway provides enterprise-grade API gateway capabilities for managing API traffic, security, and routing.
  version: '1.0'
  contact:
    name: RapidAPI Support
    url: https://docs.rapidapi.com
  termsOfService: https://rapidapi.com/terms
servers:
- url: https://gateway.rapidapi.com/v1
  description: Production Server
security:
- rapidApiKey: []
tags:
- name: Routes
  description: Endpoints for configuring request routing rules that determine how incoming API requests are forwarded to backend services.
paths:
  /gateways/{gatewayId}/routes:
    get:
      operationId: listRoutes
      summary: List routes
      description: Retrieves all routing rules configured for a gateway, including path patterns, target backends, and transformation rules.
      tags:
      - Routes
      parameters:
      - $ref: '#/components/parameters/gatewayId'
      responses:
        '200':
          description: A list of routes
          content:
            application/json:
              schema:
                type: object
                properties:
                  routes:
                    type: array
                    items:
                      $ref: '#/components/schemas/Route'
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Gateway not found
    post:
      operationId: createRoute
      summary: Create a route
      description: Creates a new routing rule for the gateway, specifying how incoming requests matching a path pattern are forwarded to a backend service.
      tags:
      - Routes
      parameters:
      - $ref: '#/components/parameters/gatewayId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteInput'
      responses:
        '201':
          description: Route created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Route'
        '400':
          description: Bad request - invalid route configuration
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Gateway not found
  /gateways/{gatewayId}/routes/{routeId}:
    put:
      operationId: updateRoute
      summary: Update a route
      description: Updates an existing routing rule's path pattern, backend target, or transformation settings.
      tags:
      - Routes
      parameters:
      - $ref: '#/components/parameters/gatewayId'
      - $ref: '#/components/parameters/routeId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteInput'
      responses:
        '200':
          description: Route updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Route'
        '400':
          description: Bad request - invalid route configuration
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Route not found
    delete:
      operationId: deleteRoute
      summary: Delete a route
      description: Deletes a routing rule from the gateway. Requests matching this route will no longer be forwarded.
      tags:
      - Routes
      parameters:
      - $ref: '#/components/parameters/gatewayId'
      - $ref: '#/components/parameters/routeId'
      responses:
        '204':
          description: Route deleted successfully
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Route not found
components:
  parameters:
    routeId:
      name: routeId
      in: path
      required: true
      description: The unique identifier of the route
      schema:
        type: string
    gatewayId:
      name: gatewayId
      in: path
      required: true
      description: The unique identifier of the gateway
      schema:
        type: string
  schemas:
    RouteInput:
      type: object
      required:
      - pathPattern
      - targetUrl
      properties:
        pathPattern:
          type: string
          description: URL path pattern to match incoming requests
        targetUrl:
          type: string
          format: uri
          description: Backend service URL to forward matching requests to
        methods:
          type: array
          items:
            type: string
            enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          description: HTTP methods this route handles
        stripPrefix:
          type: boolean
          default: false
          description: Whether to strip the matched path prefix before forwarding
        priority:
          type: integer
          default: 0
          description: Route priority for matching order
        enabled:
          type: boolean
          default: true
          description: Whether this route should be active
    Route:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the route
        gatewayId:
          type: string
          description: The gateway this route belongs to
        pathPattern:
          type: string
          description: URL path pattern to match incoming requests
        targetUrl:
          type: string
          format: uri
          description: Backend service URL to forward matching requests to
        methods:
          type: array
          items:
            type: string
            enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          description: HTTP methods this route handles
        stripPrefix:
          type: boolean
          description: Whether to strip the matched path prefix before forwarding
        priority:
          type: integer
          description: Route priority for matching order
        enabled:
          type: boolean
          description: Whether this route is currently active
  securitySchemes:
    rapidApiKey:
      type: apiKey
      name: X-RapidAPI-Key
      in: header
      description: RapidAPI key used for authenticating requests to the Gateway API.
externalDocs:
  description: RapidAPI Gateway Configuration Documentation
  url: https://docs.rapidapi.com/docs/gateway-configuration