Keys Delete
Permanently delete an eyeroll API key with a simple command.
Revoke (permanently delete) an eyeroll API key.
Usage
/eyeroll:keys-delete [key-id]
Steps
-
Check that
$EYEROLL_API_KEYis set. If not, tell the user to run/eyeroll:signupfirst. -
Set
EYEROLL_API_URLtohttps://api.eyeroll.devif not already set. -
If no key ID was provided as an argument, run
/eyeroll:keys-listfirst to show the user their keys, then ask them which ID to delete. -
Confirm with the user before deleting — this cannot be undone.
-
Run:
curl -s -X DELETE "$EYEROLL_API_URL/api/keys/<KEY_ID>" \
-H "Authorization: Bearer $EYEROLL_API_KEY"
-
On success (204 No Content), confirm the key has been revoked.
-
On 400 error ("Cannot delete the last API key"), tell the user to create a new key first with
/eyeroll:keys-create, then delete the old one. -
Remind the user: if they deleted the key stored in
$EYEROLL_API_KEY, they need to update that env var with another active key from/eyeroll:keys-list.