Tyk

Tyk Keys API

All keys that are used to access services via Tyk correspond to a session object that informs Tyk about the context of this particular token, like access rules and rate/quota allowance.

Operations 22

GET /api/apis/{apiID}/keys List keys by API. #
DELETE /api/apis/{apiID}/keys/{keyID} Delete key with API ID and key ID. #
GET /api/apis/{apiID}/keys/{keyID} Get key details with API ID and key ID. #
PUT /api/apis/{apiID}/keys/{keyID} With API ID and key ID. #
GET /api/apis/{apiId}/keys/search Search keys by API. #
GET /api/apis/keys List All the keys. #
POST /api/keys Create a key. #
DELETE /api/keys/{keyId} Delete key. #
GET /api/keys/{keyId} Get key Details. #
POST /api/keys/{keyId} Create custom key. #
PUT /api/keys/{keyId} Update key. #
GET /api/keys/detailed List All the Keys info. #
POST /api/keys/preview This will validate a key definition. #
GET /tyk/keys Tyk List Keys. #
POST /tyk/keys Tyk Create a Key. #
DELETE /tyk/keys/{keyID} Tyk Delete a Key. #
GET /tyk/keys/{keyID} Tyk Get a Key With Id. #
POST /tyk/keys/{keyID} Tyk Create Custom Key / Import Key #
PUT /tyk/keys/{keyID} Tyk Update Key. #
POST /tyk/keys/create Tyk Create a Key. #
POST /tyk/keys/policy/{keyID} Tyk Set Policies for a Hashed Key. #
POST /tyk/keys/preview Tyk This Will Validate a Key Definition. #

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/tyk-keys-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

tyk-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tyk Keys API
  version: 5.7.1
  contact:
    email: support@tyk.io
    name: Tyk Technologies
    url: https://tyk.io/contact
  license:
    name: Mozilla Public License Version 2.0
    url: https://github.com/TykTechnologies/tyk/blob/master/LICENSE.md
  description: 'Operations tagged Keys across 2 of this provider''s published API definitions: tyk-dashboard-api-openapi.yml, tyk-gateway-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{tenant}
  variables:
    tenant:
      default: localhost:8080
      description: Your dashboard host
tags:
- description: All keys that are used to access services via Tyk correspond to a session object that informs Tyk about the context of this particular token, like access rules and rate/quota allowance.
  externalDocs:
    description: API Key Management.
    url: https://tyk.io/docs/tyk-apis/tyk-dashboard-api/api-keys/
  name: Keys
paths:
  /api/apis/{apiID}/keys:
    get:
      description: Lists keys that grant access to the API with the ID {apiID}.
      operationId: listApiKeys
      parameters:
      - description: Use p query parameter to say which page you want returned. Send number less than 0 to return all items.
        example: 1
        in: query
        name: p
        required: false
        schema:
          type: integer
      - description: ID of the API.
        example: 663a4ed9b6be920001b191ae
        in: path
        name: apiID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  keys:
                  - 5e9d9544a1dcd60001d0ed20a28c495beff140a4a6d8c272a1956b99
                  - 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
                  - 5e9d9544a1dcd60001d0ed2060ff87c0deab4a508dd2ac18ccb8b664
                pages: 1
              schema:
                $ref: '#/components/schemas/Keys'
          description: Paginated key IDs.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/apis/{apiID}/keys'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve keys.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Returned when keys are hashed and hashed key listing is disabled.
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal keys data from Tyk API.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: List keys by API.
      tags:
      - Keys
      security:
      - bearerAuth: []
    servers:
    - url: https://{tenant}
      variables:
        tenant:
          default: localhost:8080
          description: Your dashboard host
  /api/apis/{apiID}/keys/{keyID}:
    delete:
      description: Deleting a key will remove it permanently from the system, however analytics relating to that key will still be available.
      operationId: deleteApiKeyDetail
      parameters:
      - description: If you are not sure if a key is hashed you can send this as true.
        example: true
        in: query
        name: auto_guess
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      - description: Use the hash of the key as input instead of the full key. Any none empty string will be interpreted as to say you want to use hash input.
        example: '1'
        in: query
        name: hashed
        required: false
        schema:
          type: string
      - description: Set to true if the passed key is a username.
        example: true
        in: query
        name: username
        required: false
        schema:
          enum:
          - true
          - false
          type: boolean
      - description: ID of API the keys grant access to. Can either be the internal or external API ID.
        example: 546e885199c947147e7f39b7d6e8e984
        in: path
        name: apiID
        required: true
        schema:
          type: string
      - description: The key ID
        example: 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
        in: path
        name: keyID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                Message: Key deleted successfully.
                Meta: null
                Status: OK
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key deleted.
        '400':
          content:
            application/json:
              example:
                Message: Attempted access to non-owned key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Trying to access a key your org does not own.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/apis/{apiID}/keys/{keyID}'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve key detail.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key with ID not found.
        '500':
          content:
            application/json:
              example:
                Message: Could not delete key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Delete key with API ID and key ID.
      tags:
      - Keys
      security:
      - bearerAuth: []
    get:
      description: Fetches the key that grant access to the API with the ID {apiID} and key ID {keyID}.
      operationId: getApiKeyDetail
      parameters:
      - description: If you are not sure if a key is hashed you can send this as true.
        example: true
        in: query
        name: auto_guess
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      - description: Use the hash of the key as input instead of the full key.Any none empty string will be interpreted as to say you want to use hash input.
        example: '1'
        in: query
        name: hashed
        required: false
        schema:
          type: string
      - description: Set to true if the passed key ID is a username.
        example: true
        in: query
        name: username
        required: false
        schema:
          enum:
          - true
          - false
          type: boolean
      - description: ID of API the keys grant access to. Can either be the internal or external API ID.
        example: 546e885199c947147e7f39b7d6e8e984
        in: path
        name: apiID
        required: true
        schema:
          type: string
      - description: The Key ID.
        example: 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
        in: path
        name: keyID
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyData'
          description: Key data fetched.
        '400':
          content:
            application/json:
              example:
                Message: Attempted access to non-owned key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Trying to access a key your org does not own.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/apis/{apiID}/keys/{keyID}'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve key detail.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key with ID not found.
      summary: Get key details with API ID and key ID.
      tags:
      - Keys
      security:
      - bearerAuth: []
    put:
      description: You can also manually add keys to Tyk using your own key-generation algorithm. It is recommended if using this approach to ensure that the OrgID being used in the API Definition and the key data is blank so that Tyk does not try to prepend or manage the key in any way.
      operationId: updateApiKeyDetail
      parameters:
      - description: If you are not sure if a key is hashed you can send this as true.
        example: true
        in: query
        name: auto_guess
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      - description: Use the hash of the key as input instead of the full key. Any none empty string will be interpreted as to say you want to use hash input.
        example: '1'
        in: query
        name: hashed
        required: false
        schema:
          type: string
      - description: Set to true if the passed key ID is a username.
        example: true
        in: query
        name: username
        required: false
        schema:
          enum:
          - true
          - false
          type: boolean
      - description: Adding the suppress_reset parameter and setting it to 1, will cause Tyk not to reset the quota limit that is in the current live quota manager. By default Tyk will reset the quota in the live quota manager (initialising it) when adding a key. Adding the `suppress_reset` flag to the URL parameters will avoid this behaviour.
        example: '1'
        in: query
        name: suppress_reset
        required: false
        schema:
          type: string
      - description: ID of API the keys grant access to. Can either be the internal or external API ID.
        example: 546e885199c947147e7f39b7d6e8e984
        in: path
        name: apiID
        required: true
        schema:
          type: string
      - description: The Key ID.
        example: 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
        in: path
        name: keyID
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              alias: portal-key
              allowance: 1000
              apply_policies:
              - 62a0ec9092faf50001395817
              enable_detailed_recording: true
              expires: 1718439136
              hmac_enabled: false
              is_inactive: false
              meta_data:
                tyk_developer_id: 62b3fb9a1d5e4f00017226f5
              org_id: 5e9d9544a1dcd60001d0ed20
              per: 60
              quota_max: -1
              quota_remaining: 0
              quota_renewal_rate: -1
              quota_renews: 1715847135
              rate: 1000
              tags:
              - edge-eu
              - edge
              throttle_interval: 0
              throttle_retry_limit: 0
            schema:
              $ref: '#/components/schemas/SessionState'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyData'
          description: Key updated
        '400':
          content:
            application/json:
              example:
                Message: User/Key object validation failed, most likely malformed input.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Malformed input.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: Request body malformed.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unmarshalling request body failed, malformed.
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve key detail.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key with ID not found.
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal Key data.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: With API ID and key ID.
      tags:
      - Keys
      security:
      - bearerAuth: []
    servers:
    - url: https://{tenant}
      variables:
        tenant:
          default: localhost:8080
          description: Your dashboard host
  /api/apis/{apiId}/keys/search:
    get:
      description: Lists keys that grant access to the API with the ID {apiID}. When q query parameter is passed it will only return keys that contains the string sent by q.
      operationId: SearchKeys
      parameters:
      - description: Filter and return all keys that contain this text in there key ID.
        example: itachi
        in: query
        name: q
        required: false
        schema:
          type: string
      - description: Use p query parameter to say which page you want returned. Send number less than 0 to return all items.
        example: 1
        in: query
        name: p
        required: false
        schema:
          type: integer
      - description: ID of the API.
        example: 663a4ed9b6be920001b191ae
        in: path
        name: apiId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  keys:
                  - 5e9d9544a1dcd60001d0ed20itachi
                  - 5e9d9544a1dcd60001d0ed20ns-itachi
                pages: 1
              schema:
                $ref: '#/components/schemas/Keys'
          description: Paginated key IDs
        '400':
          content:
            application/json:
              example:
                Message: Could not search keys.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Could not search keys.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/apis/{apiId}/keys/search'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal user data.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Search keys by API.
      tags:
      - Keys
      security:
      - bearerAuth: []
    servers:
    - url: https://{tenant}
      variables:
        tenant:
          default: localhost:8080
          description: Your dashboard host
  /api/apis/keys:
    get:
      description: Return a paginated list of keys.
      operationId: listKeys
      parameters:
      - description: Use p query parameter to say which page you want returned. Send number less than 0 to return all items.
        example: 1
        in: query
        name: p
        required: false
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  keys:
                  - 5e9d9544a1dcd60001d0ed20a28c495beff140a4a6d8c272a1956b99
                  - 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
                  - 5e9d9544a1dcd60001d0ed2060ff87c0deab4a508dd2ac18ccb8b664
                pages: 1
              schema:
                $ref: '#/components/schemas/Keys'
          description: Paginated key IDs.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/apis/keys'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal keys data from Tyk API.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: List All the keys.
      tags:
      - Keys
      security:
      - bearerAuth: []
    servers:
    - url: https://{tenant}
      variables:
        tenant:
          default: localhost:8080
          description: Your dashboard host
  /api/keys:
    post:
      description: "Tyk will generate the access token based on the OrgID specified in the API Definition and a random UUID. This ensures that keys can be owned by different API owners should segmentation be needed at an organisational level.\n  <br/><br/>\n API keys without access_rights data will be written to all APIs on the system (this also means that they will be created across all SessionHandlers and StorageHandlers, it is recommended to always embed access_rights data in a key to ensure that only targeted APIs and their back-ends are written to."
      operationId: addKey
      parameters:
      - description: Set this to true to create a basic user. Note you have to send basic_auth_data(user and password) in the request body if this value is set to true.
        example: true
        in: query
        name: basic_auth
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      requestBody:
        content:
          application/json:
            example:
              alias: portal-key
              allowance: 1000
              apply_policies:
              - 62a0ec9092faf50001395817
              enable_detailed_recording: true
              expires: 1718439136
              hmac_enabled: false
              is_inactive: false
              meta_data:
                tyk_developer_id: 62b3fb9a1d5e4f00017226f5
              org_id: 5e9d9544a1dcd60001d0ed20
              per: 60
              quota_max: -1
              quota_remaining: 0
              quota_renewal_rate: -1
              quota_renews: 1715847135
              rate: 1000
              tags:
              - edge-eu
              - edge
              throttle_interval: 0
              throttle_retry_limit: 0
            schema:
              $ref: '#/components/schemas/SessionState'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyData'
          description: New Key added.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: Request body malformed.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unmarshalling request body failed, malformed.
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal key data.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Create a key.
      tags:
      - Keys
      security:
      - bearerAuth: []
    servers:
    - url: https://{tenant}
      variables:
        tenant:
          default: localhost:8080
          description: Your dashboard host
  /api/keys/{keyId}:
    delete:
      description: Deleting a key will remove it permanently from the system, however analytics relating to that key will still be available.
      operationId: deleteKey
      parameters:
      - description: If you are not sure if a key is hashed you can send this as true.
        example: true
        in: query
        name: auto_guess
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      - description: Use the hash of the key as input instead of the full key.Any none empty string will be interpreted as to say you want to use hash input.
        example: '1'
        in: query
        name: hashed
        required: false
        schema:
          type: string
      - description: Set to true if the passed key is a username
        example: true
        in: query
        name: username
        required: false
        schema:
          enum:
          - true
          - false
          type: boolean
      - description: The ID of the key.
        example: 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
        in: path
        name: keyId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              example:
                Message: Key deleted successfully.
                Meta: null
                Status: OK
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key deleted.
        '400':
          content:
            application/json:
              example:
                Message: Attempted access to non-owned key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Trying to access a key your org does not own.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/keys/{keyId}'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve key detail.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key with ID not found
        '500':
          content:
            application/json:
              example:
                Message: Could not delete key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Delete key.
      tags:
      - Keys
      security:
      - bearerAuth: []
    get:
      description: Get the details of a key.
      operationId: getKeyDetail
      parameters:
      - description: The ID of the key.
        example: 5e9d9544a1dcd60001d0ed20e7f75f9e03534825b7aef9df749582e5
        in: path
        name: keyId
        required: true
        schema:
          type: string
      - description: If you are not sure if a key is hashed you can send this as true.
        example: true
        in: query
        name: auto_guess
        required: false
        schema:
          default: false
          enum:
          - true
          - false
          type: boolean
      - description: Use the hash of the key as input instead of the full key.Any none empty string will be interpreted as to say you want to use hash input.
        example: '1'
        in: query
        name: hashed
        required: false
        schema:
          type: string
      - description: Set to true if the passed key ID is a username.
        example: true
        in: query
        name: username
        required: false
        schema:
          enum:
          - true
          - false
          type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyData'
          description: Key Data fetched.
        '400':
          content:
            application/json:
              example:
                Message: Attempted access to non-owned key.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Trying to access a key your org does not own.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: 'access denied: You do not have permission to access  /api/keys/{keyId}'
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                Message: Could not retrieve key detail.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Key with ID not found.
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal key data from Tyk API.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Get key Details.
      tags:
      - Keys
      security:
      - bearerAuth: []
    post:
      description: Creates a key with a custom key ID.
      operationId: createCustomKey
      parameters:
      - description: The ID to give the key.
        example: my-custom-key
        in: path
        name: keyId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            example:
              alias: portal-key
              allowance: 1000
              apply_policies:
              - 62a0ec9092faf50001395817
              enable_detailed_recording: true
              expires: 1718439136
              hmac_enabled: false
              is_inactive: false
              meta_data:
                tyk_developer_id: 62b3fb9a1d5e4f00017226f5
              org_id: 5e9d9544a1dcd60001d0ed20
              per: 60
              quota_max: -1
              quota_remaining: 0
              quota_renewal_rate: -1
              quota_renews: 1715847135
              rate: 1000
              tags:
              - edge-eu
              - edge
              throttle_interval: 0
              throttle_retry_limit: 0
            schema:
              $ref: '#/components/schemas/SessionState'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyData'
          description: Key created.
        '401':
          content:
            application/json:
              example:
                Message: Not authorised
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                Message: Request body malformed.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Unmarshalling request body failed, malformed.
        '500':
          content:
            application/json:
              example:
                Message: Failed to unmarshal Key data.
                Meta: null
                Status: Error
              schema:
                $ref: '#/components/schemas/ApiResponse'
          description: Internal server error.
      summary: Create custom key.
      tags:
      - Keys
      security:
      - bearerAuth: []
    put:
      description: You can also manually add keys to Tyk using your own key-generation algorithm. It is recommended if using this approach to en

# --- truncated at 32 KB (91 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tyk/refs/heads/main/openapi/tyk-keys-api-openapi.yml