{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Control Panel","type":"markdown"},"seo":{"title":"Manually Expiring API Keys","description":"Learn how to immediately expire an API key in Treasure AI without deleting it, preserving audit history while deactivating access.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"manually-expiring-api-keys","__idx":0},"children":["Manually Expiring API Keys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can immediately expire an API key without deleting it. This is useful when:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A key may have been compromised."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An employee leaves the organization and their keys should be deactivated."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["You want to deactivate a key while preserving its audit history."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-to-manually-expire-a-key","__idx":1},"children":["How to Manually Expire a Key"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Keys"]}," portal."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locate the key you want to expire."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Force Expire"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The key immediately becomes inactive. Authentication attempts using a manually expired key will fail."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Manually expired keys are not deleted. They remain visible in the API Keys portal with an \"Expired\" status for audit and tracking purposes."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"difference-between-expiring-and-deleting","__idx":2},"children":["Difference Between Expiring and Deleting"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Key visible in portal"},"children":["Key visible in portal"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Audit history preserved"},"children":["Audit history preserved"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Can be restored"},"children":["Can be restored"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Force Expire"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delete"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Logged in Audit Log only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Force Expire"]}," when you need to maintain a record of the key's existence. Use ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Delete"]}," when you want to permanently remove the key from the portal."]}]},"headings":[{"value":"Manually Expiring API Keys","id":"manually-expiring-api-keys","depth":1},{"value":"How to Manually Expire a Key","id":"how-to-manually-expire-a-key","depth":2},{"value":"Difference Between Expiring and Deleting","id":"difference-between-expiring-and-deleting","depth":2}],"frontmatter":{"seo":{"title":"Manually Expiring API Keys","description":"Learn how to immediately expire an API key in Treasure AI without deleting it, preserving audit history while deactivating access."}},"lastModified":"2026-05-19T22:38:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/control-panel/security/api-key/manually-expiring-api-keys","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}