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

# Reveal API Key

> Read the full value of a revealable API key.

Reveal API Key returns the full secret for a key that Encrata stored as revealable.

## Authentication

Requires an API key in the `Authorization` header. Members with the `readonly`
role cannot reveal keys.

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
Authorization: Bearer enc_xxxxxxxxxxxx
```

## Request

<ParamField query="id" type="string" required>
  The key's UUID, as returned by [List API Keys](/api-reference/endpoint/list-keys).
</ParamField>

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
curl "https://developer.encrata.com/api/account/keys/reveal?id=a1b2c3d4-0000-4000-8000-000000000000" \
  -H "Authorization: Bearer enc_xxxxxxxxxxxx"
```

## Response

The response uses `Cache-Control: no-store`.

<ResponseField name="key" type="string">
  The full API key, including its `enc_` prefix.
</ResponseField>

```json theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "key": "enc_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
}
```

## Errors

| Status | Cause |
| - | - |
| `400` | `id` is missing or is not a valid UUID |
| `403` | The caller has the `readonly` role |
| `404` | The key does not exist or belongs to a different workspace |
| `410` | The key can no longer be shown |
| `405` | The request did not use `GET` |
| `500` | The key could not be retrieved |

<Warning>
  Anyone who can read this response can use the key. Do not log, cache, or send
  the returned value to a client-side application.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.