---
title: "Get available API key."
method: GET
path: "/_api/key/{keyid}"
tags: ["API Keys"]
---

# Get available API key.

`GET /_api/key/{keyid}`

## Request

- The document declares no server URL.
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/macrometa/apis/macrometa-api-reference/docs/_api/key/:keyid/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch an existing API key, identified by *keyid*. You can only get your API keys.

## Path parameters

- `keyid` string, string, required

## Response `200`

Successfully fetched API key.

- ApiKeyGetResponseHttpExamplesRc2000
  - `code` integer: HTTP response code.
  - `error` boolean: Flag if there is an error in response. *False* for this response.
  - `user` string: The ID of the API key.
  - `displayName` string: The username of the API key.
  - `active` boolean: Active status the API key.
  - `apikey` object: API key and its parent.
    - `key` string: API key
    - `parent` string: Parent of API key.
    - `isSystem` boolean: Indicates whether the key is a system API key.

## Other responses

- `401`: Failed because you do not have administrator permissions.
- `403`: Failed because you do not have access to the server.
- `404`: Failed to find specified API key.

---

[API](https://skmtc.dev/macrometa/apis/macrometa-api-reference.md) - [All operations](https://skmtc.dev/macrometa/apis/macrometa-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/macrometa/apis/macrometa-api-reference/revisions/2006b6d7f31d?raw)
