Create an API key
unkey_create_keyIssue a new API key under an API. The plaintext key is returned ONCE in the response and cannot be retrieved later unless recoverable is set. Unkey: POST /v2/keys.createKey.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | No | Arbitrary JSON metadata. | |
| name | No | A human-readable label for the key. | |
| apiId | Yes | The API to issue the key under. | |
| roles | No | Role names to attach. | |
| prefix | No | Prefix for the generated key, e.g. acme. | |
| enabled | No | Create the key enabled. Defaults to true. | |
| expires | No | Expiry as a Unix timestamp in milliseconds. | |
| byteLength | No | Entropy in bytes. Defaults to 16. | |
| externalId | No | The identity (your user or org id) this key belongs to. | |
| permissions | No | Permission names to attach. | |
| recoverable | No | Store the key encrypted so it can be shown again later. Defaults to false. |