The keys edit command allows you to modify the scopes of an existing server API key. To use it, run the following command from your terminal
crossmint keys edit <key-id>
Where <key-id> is the ID of the API key you want to edit. You can get the key id by running keys list command.

Example

Edit an API key:
crossmint keys edit sk_test_abcd1234
For client-side keys, edit the allowed origins for your key. Press <tab> for editing or <enter> for confirming the value.
  • For web enter the domain, eg: https://crossmint.com
  • For mobile enter your Android Package name or IOS Bundle ID, eg: com.company.appname
Enter multiple domains or app identifiers separated by a comma.
? Enter whitelisted domain or localhost (e.g., https://www.yourdomain.com) (separate multiple domains with a comma):
Press <tab> to edit or <enter> to confirm current value  (https://www.crossmint.com)
The CLI will display the current scopes and prompt you to select new ones:
Current scopes: Wallets
? Select the new scopes for this key: (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
❯◉ Wallets
 ◉ Minting
 ◯ Payments
 ◯ Authentication
After selecting the new scopes, you’ll see a confirmation message:
✅ API Key updated successfully!
Note: This command only works for server API keys, as client API keys do not have configurable scopes.