> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datkey.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get key



## OpenAPI

````yaml GET /keys/{id}
openapi: 3.0.0
info:
  title: Datkey Dev
  version: 1.0.0
servers:
  - url: https://api.datkey.dev
security: []
tags:
  - name: keys
paths:
  /keys/{id}:
    get:
      tags:
        - keys
      summary: Get key
      parameters:
        - name: x-api-key
          in: header
          schema:
            type: string
          description: your workspace API key
          example: <api_key>
        - name: id
          in: path
          schema:
            type: string
          required: true
          example: <key_id>
          description: your key ID
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  api_id:
                    type: string
                    example: '{api_id}'
                    description: The ID of the API the key belongs to
                  name:
                    type: string
                    example: '{api_name}'
                    description: The name assigned to the key
                  prefix:
                    type: string
                    example: prefix
                    description: The prefix assigned to the key
                  length:
                    type: integer
                    minimum: 16
                    maximum: 255
                    default: 16
                    description: The length assigned to the key
                  meta:
                    type: object
                    additionalProperties:
                      nullable: true
                    example:
                      user_id: '123456'
                    description: extra details you passed via the meta attribute
                  expires_at:
                    type: integer
                    additionalProperties:
                      nullable: true
                    format: int64
                    description: >-
                      Unix timestamp of when the key expires, returns `null`
                      when not set
                  verification_limit:
                    type: integer
                    format: int64
                    additionalProperties:
                      nullable: true
                    description: >-
                      maximum verification allowed for this key, returns `null`
                      when not set
              example:
                key:
                  id: <key_id>
                  name: <key_name>
                  key: flox_sk_05ad2bf*******
                  prefix: flox_sk
                  length: 16
                  verifications: 0
                  verification_limit: null
                  expires_at: 1733237153
                  meta: null
                  created_at: '2023-12-05T11:31:23.000000Z'
                  updated_at: '2023-12-05T11:31:23.000000Z'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
              example:
                message: key not found

````