---
title: "Get an API-key"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1/operations/get-key-auth"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1.md

# Get an API-key

`GET` `/control-planes/{controlPlaneId}/core-entities/key-auths/{KeyAuthId}`

Operation ID: `get-key-auth`

Get an API-key using ID.

## Path parameters

- `KeyAuthId` (string, required) - ID of the API-key to lookup
- `controlPlaneId` (string, uuid, required) - The UUID of your control plane. This variable is available in the Konnect manager.

## Responses

- `200` - Successfully fetched API-key
- `401` - Unauthorized
- `404` - Resource does not exist

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Konnect Control Planes Configuration
  version: 3.14.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /control-planes/{controlPlaneId}/core-entities/key-auths/{KeyAuthId}:
    parameters:
      - $ref: "#/components/parameters/KeyAuthId"
      - $ref: "#/components/parameters/controlPlaneId"
    get:
      operationId: get-key-auth
      summary: Get an API-key
      description: Get an API-key using ID.
      responses:
        "200":
          description: Successfully fetched API-key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/KeyAuth"
        "401":
          $ref: "#/components/responses/HTTP401Error"
        "404":
          description: Resource does not exist
      tags:
        - API-keys
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    KeyAuthId:
      description: ID of the API-key to lookup
      example: ""
      in: path
      name: KeyAuthId
      required: true
      schema:
        type: string
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the
        Konnect manager.
  schemas:
    KeyAuth:
      type: object
      properties:
        consumer:
          type: object
          nullable: true
          properties:
            id:
              type: string
          x-foreign: true
        created_at:
          description: Unix epoch when the resource was created.
          type: integer
          nullable: true
        description:
          description: User-defined entity description. Konnect only field, not synced to
            the Gateway.
          type: string
          nullable: true
        id:
          description: A string representing a UUID (universally unique identifier).
          type: string
          nullable: true
        key:
          type: string
          nullable: true
        managed_by:
          description: Arbitrary JSON data for client responsible for managing the entity.
            Konnect only field, not synced to the Gateway.
          type: object
          additionalProperties: true
          nullable: true
        tags:
          description: A set of strings representing tags.
          type: array
          items:
            description: A string representing a tag.
            type: string
          nullable: true
        ttl:
          description: key-auth ttl in seconds
          type: integer
          nullable: true
      example:
        consumer:
          id: 84a73fb8-50fc-44a7-a4d5-aa17728ee83f
        id: b2f34145-0343-41a4-9602-4c69dec2f269
        key: IL1deIyHyQA40WpeLeA1bIUXuvTwlGjo
      additionalProperties: false
    GatewayUnauthorizedError:
      type: object
      properties:
        message:
          type: string
        status:
          type: integer
      required:
        - message
        - status
  responses:
    HTTP401Error:
      description: Unauthorized
      content:
        application/json:
          examples:
            DuplicateApiKey:
              summary: Duplicate API key found
              value:
                message: Duplicate API key found
                status: 401
            InvalidAuthCred:
              summary: Invalid authentication credentials
              value:
                message: Unauthorized
                status: 401
            NoAPIKey:
              summary: No API key found
              value:
                message: No API key found in request
                status: 401
          schema:
            $ref: "#/components/schemas/GatewayUnauthorizedError"
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: The Konnect access token is meant to be used by the Konnect
        dashboard and the decK CLI to authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
