Amazon API Gateway Routes API

Manage routes within an API

GitHub OpenAPI

Operations 5

POST /v2/apis/{ApiId}/routes Create Route #
GET /v2/apis/{ApiId}/routes Get Routes #
DELETE /v2/apis/{ApiId}/routes/{RouteId} Delete Route #
GET /v2/apis/{ApiId}/routes/{RouteId} Get Route #
PATCH /v2/apis/{ApiId}/routes/{RouteId} Update Route #

Documentation

Specifications

Schemas & Data

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/aws-api-gateway:aws-api-gateway-routes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

aws-api-gateway-routes-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon API Gateway Routes API
  version: '2015-07-09'
  description: Generated from AWS's published Smithy model for Amazon API Gateway. 5 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://apigateway.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /v2/apis/{ApiId}/routes:
    post:
      operationId: CreateRoute
      summary: Create Route
      description: Creates a Route for an API.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRouteResult'
        '400':
          description: BadRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayBadRequestException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayConflictException'
        '404':
          description: NotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayTooManyRequestsException'
      parameters:
      - name: ApiId
        in: path
        required: true
        schema:
          type: string
        description: The API identifier.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ApiKeyRequired:
                  type: boolean
                  description: Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
                AuthorizationScopes:
                  type: array
                  items:
                    type: string
                  description: The authorization scopes supported by this route.
                AuthorizationType:
                  type: string
                  enum:
                  - NONE
                  - AWS_IAM
                  - CUSTOM
                  - JWT
                  description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access,
                    AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values
                    are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM
                    for using a Lambda authorizer.
                AuthorizerId:
                  type: string
                  description: The identifier of the Authorizer resource to be associated with this route. The authorizer
                    identifier is generated by API Gateway when you created the authorizer.
                ModelSelectionExpression:
                  type: string
                  description: The model selection expression for the route. Supported only for WebSocket APIs.
                OperationName:
                  type: string
                  description: The operation name for the route.
                RequestModels:
                  type: object
                  additionalProperties:
                    type: string
                  description: The request models for the route. Supported only for WebSocket APIs.
                RequestParameters:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/ParameterConstraints'
                  description: The request parameters for the route. Supported only for WebSocket APIs.
                RouteKey:
                  type: string
                  description: The route key for the route.
                RouteResponseSelectionExpression:
                  type: string
                  description: The route response selection expression for the route. Supported only for WebSocket APIs.
                Target:
                  type: string
                  description: The target for the route.
              required:
              - RouteKey
      tags:
      - Routes
    get:
      operationId: GetRoutes
      summary: Get Routes
      description: Gets the Routes for an API.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRoutesResponse'
        '400':
          description: BadRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayBadRequestException'
        '404':
          description: NotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayTooManyRequestsException'
      parameters:
      - name: ApiId
        in: path
        required: true
        schema:
          type: string
        description: The API identifier.
      - name: maxResults
        in: query
        schema:
          type: string
        description: The maximum number of elements to be returned for this resource.
      - name: nextToken
        in: query
        schema:
          type: string
        description: The next page of elements from this collection. Not valid for the last element of the collection.
      tags:
      - Routes
  /v2/apis/{ApiId}/routes/{RouteId}:
    delete:
      operationId: DeleteRoute
      summary: Delete Route
      description: Deletes a Route.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: string
        '404':
          description: NotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayTooManyRequestsException'
      parameters:
      - name: ApiId
        in: path
        required: true
        schema:
          type: string
        description: The API identifier.
      - name: RouteId
        in: path
        required: true
        schema:
          type: string
        description: The route ID.
      tags:
      - Routes
    get:
      operationId: GetRoute
      summary: Get Route
      description: Gets a Route.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetRouteResult'
        '404':
          description: NotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayTooManyRequestsException'
      parameters:
      - name: ApiId
        in: path
        required: true
        schema:
          type: string
        description: The API identifier.
      - name: RouteId
        in: path
        required: true
        schema:
          type: string
        description: The route ID.
      tags:
      - Routes
    patch:
      operationId: UpdateRoute
      summary: Update Route
      description: Updates a Route.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateRouteResult'
        '400':
          description: BadRequestException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayBadRequestException'
        '409':
          description: ConflictException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayConflictException'
        '404':
          description: NotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayNotFoundException'
        '429':
          description: TooManyRequestsException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApigatewayTooManyRequestsException'
      parameters:
      - name: ApiId
        in: path
        required: true
        schema:
          type: string
        description: The API identifier.
      - name: RouteId
        in: path
        required: true
        schema:
          type: string
        description: The route ID.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ApiKeyRequired:
                  type: boolean
                  description: Specifies whether an API key is required for the route. Supported only for WebSocket APIs.
                AuthorizationScopes:
                  type: array
                  items:
                    type: string
                  description: The authorization scopes supported by this route.
                AuthorizationType:
                  type: string
                  enum:
                  - NONE
                  - AWS_IAM
                  - CUSTOM
                  - JWT
                  description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access,
                    AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values
                    are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM
                    for using a Lambda authorizer.
                AuthorizerId:
                  type: string
                  description: The identifier of the Authorizer resource to be associated with this route. The authorizer
                    identifier is generated by API Gateway when you created the authorizer.
                ModelSelectionExpression:
                  type: string
                  description: The model selection expression for the route. Supported only for WebSocket APIs.
                OperationName:
                  type: string
                  description: The operation name for the route.
                RequestModels:
                  type: object
                  additionalProperties:
                    type: string
                  description: The request models for the route. Supported only for WebSocket APIs.
                RequestParameters:
                  type: object
                  additionalProperties:
                    $ref: '#/components/schemas/ParameterConstraints'
                  description: The request parameters for the route. Supported only for WebSocket APIs.
                RouteKey:
                  type: string
                  description: The route key for the route.
                RouteResponseSelectionExpression:
                  type: string
                  description: The route response selection expression for the route. Supported only for WebSocket APIs.
                Target:
                  type: string
                  description: The target for the route.
      tags:
      - Routes
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: apigateway
  schemas:
    ApigatewayBadRequestException:
      type: object
      properties:
        Message:
          type: string
          description: Describes the error encountered.
    ApigatewayConflictException:
      type: object
      properties:
        Message:
          type: string
          description: Describes the error encountered.
    ApigatewayNotFoundException:
      type: object
      properties:
        Message:
          type: string
          description: Describes the error encountered.
        ResourceType:
          type: string
          description: The resource type.
    ApigatewayTooManyRequestsException:
      type: object
      properties:
        LimitType:
          type: string
          description: The limit type.
        Message:
          type: string
          description: Describes the error encountered.
    CreateRouteResult:
      type: object
      properties:
        ApiGatewayManaged:
          type: boolean
          description: Specifies whether a route is managed by API Gateway. If you created an API using quick create, the
            $default route is managed by API Gateway. You can't modify the $default route key.
        ApiKeyRequired:
          type: boolean
          description: Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
        AuthorizationScopes:
          type: array
          items:
            type: string
          description: A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to
            authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed
            from the access token in the incoming request. The method invocation is authorized if any route scope matches
            a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured,
            the client must provide an access token instead of an identity token for authorization purposes.
        AuthorizationType:
          type: string
          enum:
          - NONE
          - AWS_IAM
          - CUSTOM
          - JWT
          description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM
            for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for
            open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda
            authorizer.
        AuthorizerId:
          type: string
          description: The identifier of the Authorizer resource to be associated with this route. The authorizer identifier
            is generated by API Gateway when you created the authorizer.
        ModelSelectionExpression:
          type: string
          description: The model selection expression for the route. Supported only for WebSocket APIs.
        OperationName:
          type: string
          description: The operation name for the route.
        RequestModels:
          type: object
          additionalProperties:
            type: string
          description: The request models for the route. Supported only for WebSocket APIs.
        RequestParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ParameterConstraints'
          description: The request parameters for the route. Supported only for WebSocket APIs.
        RouteId:
          type: string
          description: The route ID.
        RouteKey:
          type: string
          description: The route key for the route.
        RouteResponseSelectionExpression:
          type: string
          description: The route response selection expression for the route. Supported only for WebSocket APIs.
        Target:
          type: string
          description: The target for the route.
    GetRouteResult:
      type: object
      properties:
        ApiGatewayManaged:
          type: boolean
          description: Specifies whether a route is managed by API Gateway. If you created an API using quick create, the
            $default route is managed by API Gateway. You can't modify the $default route key.
        ApiKeyRequired:
          type: boolean
          description: Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
        AuthorizationScopes:
          type: array
          items:
            type: string
          description: A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to
            authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed
            from the access token in the incoming request. The method invocation is authorized if any route scope matches
            a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured,
            the client must provide an access token instead of an identity token for authorization purposes.
        AuthorizationType:
          type: string
          enum:
          - NONE
          - AWS_IAM
          - CUSTOM
          - JWT
          description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM
            for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for
            open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda
            authorizer.
        AuthorizerId:
          type: string
          description: The identifier of the Authorizer resource to be associated with this route. The authorizer identifier
            is generated by API Gateway when you created the authorizer.
        ModelSelectionExpression:
          type: string
          description: The model selection expression for the route. Supported only for WebSocket APIs.
        OperationName:
          type: string
          description: The operation name for the route.
        RequestModels:
          type: object
          additionalProperties:
            type: string
          description: The request models for the route. Supported only for WebSocket APIs.
        RequestParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ParameterConstraints'
          description: The request parameters for the route. Supported only for WebSocket APIs.
        RouteId:
          type: string
          description: The route ID.
        RouteKey:
          type: string
          description: The route key for the route.
        RouteResponseSelectionExpression:
          type: string
          description: The route response selection expression for the route. Supported only for WebSocket APIs.
        Target:
          type: string
          description: The target for the route.
    GetRoutesResponse:
      type: object
      properties:
        Items:
          type: array
          items:
            $ref: '#/components/schemas/Route'
          description: The elements from this collection.
        NextToken:
          type: string
          description: The next page of elements from this collection. Not valid for the last element of the collection.
    ParameterConstraints:
      type: object
      properties:
        Required:
          type: boolean
          description: Whether or not the parameter is required.
    Route:
      type: object
      properties:
        ApiGatewayManaged:
          type: boolean
          description: Specifies whether a route is managed by API Gateway. If you created an API using quick create, the
            $default route is managed by API Gateway. You can't modify the $default route key.
        ApiKeyRequired:
          type: boolean
          description: Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
        AuthorizationScopes:
          type: array
          items:
            type: string
          description: A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to
            authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed
            from the access token in the incoming request. The method invocation is authorized if any route scope matches
            a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured,
            the client must provide an access token instead of an identity token for authorization purposes.
        AuthorizationType:
          type: string
          enum:
          - NONE
          - AWS_IAM
          - CUSTOM
          - JWT
          description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM
            for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for
            open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda
            authorizer.
        AuthorizerId:
          type: string
          description: The identifier of the Authorizer resource to be associated with this route. The authorizer identifier
            is generated by API Gateway when you created the authorizer.
        ModelSelectionExpression:
          type: string
          description: The model selection expression for the route. Supported only for WebSocket APIs.
        OperationName:
          type: string
          description: The operation name for the route.
        RequestModels:
          type: object
          additionalProperties:
            type: string
          description: The request models for the route. Supported only for WebSocket APIs.
        RequestParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ParameterConstraints'
          description: The request parameters for the route. Supported only for WebSocket APIs.
        RouteId:
          type: string
          description: The route ID.
        RouteKey:
          type: string
          description: The route key for the route.
        RouteResponseSelectionExpression:
          type: string
          description: The route response selection expression for the route. Supported only for WebSocket APIs.
        Target:
          type: string
          description: The target for the route.
      required:
      - RouteKey
    UpdateRouteResult:
      type: object
      properties:
        ApiGatewayManaged:
          type: boolean
          description: Specifies whether a route is managed by API Gateway. If you created an API using quick create, the
            $default route is managed by API Gateway. You can't modify the $default route key.
        ApiKeyRequired:
          type: boolean
          description: Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
        AuthorizationScopes:
          type: array
          items:
            type: string
          description: A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to
            authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed
            from the access token in the incoming request. The method invocation is authorized if any route scope matches
            a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured,
            the client must provide an access token instead of an identity token for authorization purposes.
        AuthorizationType:
          type: string
          enum:
          - NONE
          - AWS_IAM
          - CUSTOM
          - JWT
          description: The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM
            for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for
            open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda
            authorizer.
        AuthorizerId:
          type: string
          description: The identifier of the Authorizer resource to be associated with this route. The authorizer identifier
            is generated by API Gateway when you created the authorizer.
        ModelSelectionExpression:
          type: string
          description: The model selection expression for the route. Supported only for WebSocket APIs.
        OperationName:
          type: string
          description: The operation name for the route.
        RequestModels:
          type: object
          additionalProperties:
            type: string
          description: The request models for the route. Supported only for WebSocket APIs.
        RequestParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ParameterConstraints'
          description: The request parameters for the route. Supported only for WebSocket APIs.
        RouteId:
          type: string
          description: The route ID.
        RouteKey:
          type: string
          description: The route key for the route.
        RouteResponseSelectionExpression:
          type: string
          description: The route response selection expression for the route. Supported only for WebSocket APIs.
        Target:
          type: string
          description: The target for the route.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/apigatewayv2/service/2018-11-29/apigatewayv2-2018-11-29.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)