Render Services - Routes API

Add Redirect or Rewrite Rules to modify requests to your site without writing code. You can use URL parameters to capture path segments, and wildcards to redirect everything under a given path.

Operations 5

GET /services/{serviceId}/routes List redirect/rewrite rules #
POST /services/{serviceId}/routes Add redirect/rewrite rules #
PATCH /services/{serviceId}/routes Update redirect/rewrite rule priority #
PUT /services/{serviceId}/routes Update redirect/rewrite rules #
DELETE /services/{serviceId}/routes/{routeId} Delete redirect/rewrite rule #

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/render-services-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

render-services-routes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Render Public Audit Logs Services - Routes API
  description: Manage everything about your Render services
  version: 1.0.0
  contact:
    name: Render API
    url: https://community.render.com
    email: support@render.com
servers:
- url: https://api.render.com/v1
security:
- BearerAuth: []
tags:
- name: Services - Routes
  description: Add Redirect or Rewrite Rules to modify requests to your site without writing code. You can use URL parameters to capture path segments, and wildcards to redirect everything under a given path.
paths:
  /services/{serviceId}/routes:
    parameters:
    - $ref: '#/components/parameters/serviceIdParam'
    get:
      summary: List redirect/rewrite rules
      description: 'List a particular service''s redirect/rewrite rules that match the provided filters. If no filters are provided, all rules for the service are returned.

        '
      operationId: list-routes
      tags:
      - Services - Routes
      parameters:
      - name: type
        in: query
        schema:
          type: array
          items:
            type: string
            enum:
            - redirect
            - rewrite
        style: form
        explode: false
        required: false
        description: Filter for the type of route rule
      - name: source
        in: query
        schema:
          type: array
          items:
            type: string
        style: form
        explode: false
        required: false
        description: Filter for the source path of the route
      - name: destination
        in: query
        schema:
          type: array
          items:
            type: string
        style: form
        explode: false
        required: false
        description: Filter for the destination path of the route
      - $ref: '#/components/parameters/cursorParam'
      - $ref: '#/components/parameters/limitParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/routeWithCursor'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    post:
      summary: Add redirect/rewrite rules
      description: 'Add redirect/rewrite rules to the service with the provided ID.

        '
      operationId: add-route
      tags:
      - Services - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/routePost'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/route'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    patch:
      summary: Update redirect/rewrite rule priority
      description: 'Update the priority for a particular redirect/rewrite rule.


        To apply redirect/rewrite rules to an incoming request, Render starts from the rule with priority `0` and applies the first encountered rule that matches the request''s path (if any).


        Render increments the priority of other rules by `1` as necessary to make space for the updated rule.

        '
      operationId: patch-route
      tags:
      - Services - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/routePatch'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  headers:
                    $ref: '#/components/schemas/route'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
    put:
      summary: Update redirect/rewrite rules
      description: 'Replace all redirect/rewrite rules for a particular service with the provided list.


        **This deletes all existing redirect/rewrite rules for the service that aren''t included in the request.**


        Rule priority is assigned according to list order (the first rule in the list has the highest priority).

        '
      operationId: put-routes
      tags:
      - Services - Routes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/routePut'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/route'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
  /services/{serviceId}/routes/{routeId}:
    parameters:
    - $ref: '#/components/parameters/serviceIdParam'
    - name: routeId
      in: path
      required: true
      description: The id of the route
      schema:
        type: string
    delete:
      summary: Delete redirect/rewrite rule
      description: 'Delete a particular redirect/rewrite rule for a particular service.

        '
      operationId: delete-route
      tags:
      - Services - Routes
      responses:
        '204':
          description: Route deleted
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
        '406':
          $ref: '#/components/responses/406NotAcceptable'
        '410':
          $ref: '#/components/responses/410Gone'
        '429':
          $ref: '#/components/responses/429RateLimit'
        '500':
          $ref: '#/components/responses/500InternalServerError'
        '503':
          $ref: '#/components/responses/503ServiceUnavailable'
components:
  schemas:
    routeType:
      type: string
      enum:
      - redirect
      - rewrite
    routePost:
      type: object
      required:
      - type
      - source
      - destination
      properties:
        type:
          $ref: '#/components/schemas/routeType'
        source:
          type: string
          example: /:bar/foo
        destination:
          type: string
          example: /foo/:bar
        priority:
          type: integer
          description: Redirect and Rewrite Rules are applied in priority order starting at 0. Defaults to last in the priority list.
    routePatch:
      type: object
      required:
      - priority
      properties:
        priority:
          x-go-type: '*int'
          type: integer
          description: Redirect and Rewrite Rules are applied in priority order starting at 0. Moves this route to the specified priority and adjusts other route priorities accordingly.
    error:
      type: object
      properties:
        id:
          type: string
        message:
          type: string
    route:
      type: object
      required:
      - id
      - type
      - source
      - destination
      - priority
      properties:
        id:
          type: string
        type:
          $ref: '#/components/schemas/routeType'
        source:
          type: string
        destination:
          type: string
        priority:
          type: integer
          description: Redirect and Rewrite Rules are applied in priority order starting at 0
    routeWithCursor:
      type: object
      required:
      - route
      - cursor
      properties:
        route:
          $ref: '#/components/schemas/route'
        cursor:
          type: string
    routePut:
      type: object
      required:
      - type
      - source
      - destination
      properties:
        type:
          $ref: '#/components/schemas/routeType'
        source:
          type: string
          example: /:bar/foo
        destination:
          type: string
          example: /foo/:bar
  responses:
    406NotAcceptable:
      description: Unable to generate preferred media types as specified by Accept request header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    503ServiceUnavailable:
      description: Server currently unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    410Gone:
      description: The requested resource is no longer available.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    404NotFound:
      description: Unable to find the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    401Unauthorized:
      description: Authorization information is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    429RateLimit:
      description: Rate limit has been surpassed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    500InternalServerError:
      description: An unexpected server error has occurred.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    403Forbidden:
      description: You do not have permissions for the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
    400BadRequest:
      description: The request could not be understood by the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  parameters:
    limitParam:
      name: limit
      in: query
      required: false
      description: The maximum number of items to return. For details, see [Pagination](https://api-docs.render.com/reference/pagination).
      schema:
        type: integer
        default: 20
        minimum: 1
        maximum: 100
        description: Defaults to 20
    cursorParam:
      name: cursor
      in: query
      required: false
      description: The position in the result list to start from when fetching paginated results. For details, see [Pagination](https://api-docs.render.com/reference/pagination).
      schema:
        type: string
    serviceIdParam:
      name: serviceId
      in: path
      required: true
      description: The ID of the service
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
x-readme:
  metrics-enabled: false