Skip to main content

signaloid-cli keys delete

Delete an API key.

Synopsis​

signaloid-cli keys delete [--key-id <id>]
signaloid-cli keys revoke [--key-id <id>]

revoke is an alias for delete.

Options​

OptionRequiredDescription
--key-id <id>NoKey ID to delete. The signaloid-cli keys list command shows the Key ID of every key.

If you omit --key-id, the CLI lists your keys and asks you to select the key to delete.

Description​

Permanently deletes an API key. Once deleted, any applications or services using this key will no longer be able to authenticate with Signaloid Cloud Compute Engine.

Examples​

Delete a Key​

signaloid-cli keys delete --key-id 582129bb6ea3453c9c6c93085c27c90a

Output:

✔ API key deleted

The CLI prints this message on standard error and prints nothing on standard output.

Select the Key Interactively​

signaloid-cli keys delete

The CLI shows the prompt Select an API key to delete: with one line for each key and a Cancel option. The prompt needs an interactive terminal.

Delete Keys Older than 1 Year​

# CreatedAt is a Unix timestamp in seconds
ONE_YEAR_AGO=$(date -d '1 year ago' +%s)

signaloid-cli keys list | \
jq --arg cutoff "$ONE_YEAR_AGO" -r '.Keys[] |
select(.CreatedAt < ($cutoff | tonumber)) |
.KeyID' | \
while read KEY_ID; do
echo "Deleting old key: $KEY_ID"
signaloid-cli keys delete --key-id $KEY_ID
done

Safe Key Rotation with Delete​

#!/bin/bash
# Rotate API key safely

OLD_KEY_ID="582129bb6ea3453c9c6c93085c27c90a"
KEY_NAME="Production API Key"

# 1. Create new key
echo "Creating new key..."
NEW_KEY_RESPONSE=$(signaloid-cli keys create --name "$KEY_NAME")
NEW_KEY=$(echo "$NEW_KEY_RESPONSE" | jq -r '.Key')

# 2. Test new key (the CLI uses the key it is logged in with)
if signaloid-cli auth login --api-key "$NEW_KEY" && signaloid-cli auth whoami; then
echo "✓ New key works"
else
echo "✗ New key failed"
exit 1
fi

# 3. Update deployment
echo "Update your deployment with new key: $NEW_KEY"
read -p "Press enter after updating deployment..."

# 4. Delete old key
signaloid-cli keys delete --key-id $OLD_KEY_ID
echo "Old key deleted"

Notes​

  • Key deletion is permanent and cannot be undone
  • Applications using the deleted key lose access within milliseconds.
  • An API key can delete itself. If you delete the key that the CLI is logged in with, the API rejects later requests with HTTP status 401, so you must log in again with a different key.
  • Consider rotating keys (creating a new one first) instead of deleting if the key is currently in use
  • Verify the key ID before deletion to avoid accidentally deleting the wrong key

Troubleshooting​

"Key not found" Error​

Problem: Cannot delete or access key.

Solutions:

  1. List all keys to verify ID:
    signaloid-cli keys list
  2. Check for typos in key ID
  3. Verify key was not already deleted
  4. Ensure you have permission to manage keys

See Also​