Manage Access Keys

In this guide, you will create, deactivate, and delete Guardrails API access keys. Access keys let you interact with the GraphQL API programmatically from Terraform, scripts, the CLI, or any HTTP client. Any user can manage their own access keys, but an access key's API permissions are limited to whatever grants you have in the workspace.

Prerequisites

Step 1: Open Your Profile

Click your name at the bottom of the sidebar to open your profile page. The header shows your name with Reset Password and Log Out buttons, and the page has Accounts, AWS Access Keys, Access Keys, Profile, and Developers tabs.

Your profile page showing the header and its tabs

Step 2: Open the Access Keys Tab

Select the Access Keys tab. It lists your existing access keys with their status and creation date, and provides a Create Access Key button.

The Access Keys tab showing existing keys and the Create Access Key button

Step 3: Create an Access Key

Click Create Access Key. Guardrails generates the key pair and displays the Access Key ID and a masked Secret Access Key.

The Access Key created dialog showing the access key ID and masked secret key

FieldDescription
Access Key IDThe public identifier for this key, used as the key ID when authenticating.
Secret Access KeyThe private credential. Click the eye icon to reveal it, then copy it to a secure location.

[!IMPORTANT] The secret key is shown exactly once. If you lose it, you must create a new key pair. There is no way to retrieve an existing secret key.

Click OK to close the dialog. The new key appears in your list with an Active status and can be used for API authentication immediately.

The Access Keys tab showing the newly created key with Active status

Step 4: Deactivate an Access Key

Deactivating a key prevents it from authenticating to the API without permanently deleting it, and you can reactivate it later. On the key's row, click the deactivate icon.

A confirmation dialog names the key.

The Deactivate Access Key confirmation dialog

Click Deactivate to confirm. The key's status changes to Inactive and API requests using it are rejected immediately. The row now shows a reactivate icon and a delete icon.

The Access Keys tab showing the key as Inactive with reactivate and delete icons on its row

To reactivate later, click the reactivate icon on the row.

Step 5: Delete an Access Key

Deleting a key is permanent and cannot be undone. A key must be deactivated before it can be deleted. On the inactive key's row, click the delete icon.

The Delete Access Key confirmation dialog

Click Delete to confirm. The key is permanently removed from your profile.

[!WARNING] Deleting an access key is irreversible. Any scripts, Terraform configurations, or CI/CD pipelines using this key immediately lose access. Verify that the key is not in active use before deleting.

Troubleshooting

IssueSolution
API requests return 401 UnauthorizedVerify the key is Active on the Access Keys tab. Check that you're using both the access key ID and secret key correctly.
Can't delete a keyThe key must be deactivated first. Deactivate it, then delete.
API calls succeed but return permission errorsAccess keys inherit your permission grants. The key authenticates you, but you may not have the required permission for the specific API operation. Contact your administrator for additional grants.
Keys were automatically deactivatedAn access key expiration policy may be in effect. See Configure API Key Expiration.

Next Steps