---
title: "List available API keys"
method: GET
path: "/_api/key"
tags: ["API Keys"]
---

# List available API keys

`GET /_api/key`

## 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/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve information about all of your API keys. Privileged users (service or _mm.root user) can use the 'user' query parameter to retrieve information of API keys belonging to another user.

## Query parameters

- `user` string

## Response `200`

Successfully fetched API keys.

- ApiKeyHttpExamplesRc200
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `result` Apikey200Help[]: An array of API keys with details as keyid, user name and tenant name.
    - `keyid` string: Keyid of the API key.
    - `user` string: Name of the user.
    - `tenant` string: Name of the tenant.
    - `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.

---

[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)
