---
title: "Validate API Key"
method: POST
path: "/_api/key/validate"
tags: ["API Keys"]
---

# Validate API Key

`POST /_api/key/validate`

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

Requires a JSON object with these properties:

  - **apikey**: The API key as a string.
  - **jwt**: The JWT token as a string.

**Note**: Requires *administrator* permissions.

## Request body

- ApikeyValidate
  - `apikey` string, required: The id of the API key.

## Response `200`

Successfully validated API key.

- object
  - `code` integer: HTTP response code.
  - `error` boolean, required: Flag if there is an error in response. *False* for this response.
  - `result` object[]: An array of API keys with details as keyid, user name and tenant name.
    - `keyid` string: Keyid of the API key.
    - `parent` string: Name of the parent.
    - `tenant` string: Name of the tenant.
    - `limitRequestsPerSec` integer: Maximum request limit.

## Other responses

- `400`: Failed due to missing or malformed data. Verify that all parameters are complete.
- `401`: Failed because you do not have administrator permissions.
- `403`: Failed to validate 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)
