# What this API key is

> Returns the key's id, name, prefix, scopes, environment, organization, and whether the key belongs to a partner account (`partner`).

Source: https://docs.spicrawl.com/api-reference/keys/key-info

## GET /v1/key

Operation ID: `keyInfo`.

Returns the key's id, name, prefix, scopes, environment, organization, and whether the key belongs to a
partner account (`partner`). Any valid key may call it; no scope is needed. The secret and its hash are
never returned. `Cache-Control: no-store`.

### Example

```bash
curl "https://api.spicrawl.com/v1/key" \
  -H "Authorization: Bearer $SPICRAWL_API_KEY"
```

### Responses

#### 200

The key.

`application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `key_id` | string (uuid) | yes |  |
| `name` | string | yes |  |
| `prefix` | string | yes | The display prefix |
| `scopes` | array of string | yes |  |
| `environment` | string: `live`, `test` | yes |  |
| `organization` | object | yes |  |
| `partner` | boolean | yes | True only for the key of a partner account. A partner's workspace key reports false. |
| `created_at` | string (date-time) | yes |  |
| `expires_at` | string \| null (date-time) | no |  |

#### 401

Missing, invalid, revoked or expired key. Not retryable with the same key.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

#### 500

Internal error. Retryable when `retryable` is true.

Headers: `X-Request-Id`.

`application/problem+json` (`Problem` schema).

Full OpenAPI spec: https://docs.spicrawl.com/openapi.yaml
