Skip to main content
After you create a scoped key, you’ll audit what’s active, revoke keys you no longer need, and rotate keys before they expire. If you haven’t created a key yet, start with Scoped API keys. Listing, revoking, and delegating keys requires the master key or a scoped key with the matching api-keys:* scopes. See Scopes for permissions and Owner context for which keys a caller can manage.

List keys

List keys for an owner to see what’s active. The plaintext key value is never returned. You get metadata such as name, scopes, expiry, and last-used timestamp.
200 OK

Revoke a key

Revoke a key when it’s no longer needed or you suspect it was exposed.
A successful revoke returns 204 No Content with an empty body. The key stops working on the next request.
Revoking a key takes effect immediately. Deploy a replacement key before revoking the old one.

Delegate key creation

Available on Blnk Core 0.14.3 and later.
A scoped key with api-keys:write can create narrower keys for its own owner, as long as it only grants scopes it already holds. See Owner context for inheritance and cross-owner rules.

Rotate a key

1

Create the replacement key

Create a new key with the same scopes or tighter ones:
Copy the plaintext key value from the response immediately. You won’t see it again.
2

Update your applications

Deploy the new key to your secret manager or environment variables. Verify the service works with the new key.
3

Revoke the old key

Delete the old key:
Confirm your applications no longer reference the old key.
4

Audit

List keys for the owner and confirm only the expected keys remain active:

Security best practices

  • Review your key list regularly. Look for keys with broad scopes, keys that haven’t been used recently, and keys approaching their expiry date.
  • Create a separate key for each service or environment.
  • Set expiration dates and grant the minimum scopes. See Scopes before each create.
  • Store keys in a secret manager. Never commit them to version control.

Error handling

Structured errors are available from Blnk Core 0.15.0 and later.
When a list, create, or revoke request fails validation or owner checks, Blnk returns 400 Bad Request or 404 Not Found.
400 Bad Request
To resolve the error: Delegation and cross-owner errors are covered in Owner context. Permission errors for missing scopes are covered in Scopes.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.