API Keys Page
A contained API keys page with masked keys, scope chips and last use, a create dialog that shows the secret once with copy, revoke with confirmation and a usage sparkline.
Preview
API keys
Keys act on behalf of your workspace. Keep them secret.
Requests, last 14 days
18,245
3 keys
- Reporting scriptLivelk_live_ending 7f3aplans:readUsed 2 min agoCreated Oct 3
- Chat botLivelk_live_ending c91eplans:readplans:writeUsed YesterdayCreated Sep 18
- Staging syncTestlk_test_ending 04bdplans:readmembers:readNever usedCreated Aug 30
Example request
curl https://api.pebble.example/v1/plans \
-H "Authorization: Bearer lk_live_••••7f3a"Install
Pro source requires Pebble Pro. Try the full preview above.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| keys | { id, name, last4, env, scopes, created, lastUsed? }[] | — | Keys shown masked as prefix_env_••••last4 with scope chips. |
| scopes | { id, label, description? }[] | — | Scopes offered in the create dialog. |
| prefix | string | "lk" | Key prefix. |
| usage | number[] | [] | Requests per day, oldest first, for the usage sparkline. |
| usageLabel | string | "Requests, last 14 days" | Label of the usage total. |
| onCreate | ({ name, env, scopes }) => Promise<{ id, secret }> | local random secret | Create a key; the secret is shown once with Copy. |
| onRevoke | (id) => Promise<void> | void | — | Revoke after the confirm dialog. |
| example | string | — | Usage example under the list, e.g. a curl command. |
Pro component
Try the full preview above. Editable source and build guides require Pebble Pro.
