Revokes a key. It stops authenticating immediately. Requires keys_write.
Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: "revoked".
{"docsConfig":{"theme":"sequoia","$schema":"https://mintlify.com/docs.json","name":"OpenType Docs","description":"OpenType answers typed questions about your data in one model call per run. Send a state and a set of questions; get calibrated answers back.","colors":{"primary":"#0A7A3B","light":"#2DEC80","dark":"#0A7A3B"},"logo":{"light":"https://mintcdn.com/opentype/nqaaLldDOctxoCbH/logo/light.svg?fit=max\u0026auto=format\u0026n=nqaaLldDOctxoCbH\u0026q=85\u0026s=73a92db185691378733575d262c4447f","dark":"https://mintcdn.com/opentype/nqaaLldDOctxoCbH/logo/dark.svg?fit=max\u0026auto=format\u0026n=nqaaLldDOctxoCbH\u0026q=85\u0026s=3cc19793d85db57b7dd672606262a9f8","href":"https://docs.opentype.dev"},"favicon":"https://mintcdn.com/opentype/nqaaLldDOctxoCbH/favicon.svg?fit=max\u0026auto=format\u0026n=nqaaLldDOctxoCbH\u0026q=85\u0026s=220ca1f48e54505dd8638808f8bfe8d8","api":{"params":{"expanded":"closed"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["bash","typescript","python"],"autogenerate":true}},"appearance":{"default":"system"},"background":{"color":{"light":"#F7F7F4","dark":"#090A09"}},"navbar":{"links":[{"href":"https://console.opentype.dev","label":"Console"}],"primary":{"type":"button","label":"Get API key","href":"https://console.opentype.dev/keys"}},"footer":{"socials":{"github":"https://github.com/OpentypeAI"},"links":[{"header":"Docs","items":[{"label":"Quickstart","href":"/getting-started/quickstart"},{"label":"Guides","href":"/guides"},{"label":"API reference","href":"/api-reference/introduction"},{"label":"Problem codes","href":"/problems"}]},{"header":"Console","items":[{"label":"Playground","href":"https://console.opentype.dev/playground"},{"label":"API keys","href":"https://console.opentype.dev/keys"},{"label":"Usage","href":"https://console.opentype.dev/usage"},{"label":"Billing","href":"https://console.opentype.dev/billing"}]},{"header":"OpenType","items":[{"label":"Changelog","href":"/reference/changelog"},{"label":"Security","href":"/security"},{"label":"GitHub","href":"https://github.com/OpentypeAI"}]}]},"search":{"prompt":"Search runs, questions, keys and error codes..."},"seo":{"metatags":{"og:site_name":"OpenType","og:image":"https://opentype.dev/og/docs.png","og:image:width":"1200","og:image:height":"630","twitter:card":"summary_large_image","twitter:image":"https://opentype.dev/og/docs.png"},"indexing":"navigable"},"fonts":{"heading":{"family":"Geist"},"body":{"family":"Geist"}},"styling":{"codeblocks":"system","latex":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"That path is not in the OpenType docs. Try the [quickstart](/getting-started/quickstart) or the [API reference](/api-reference/introduction). If an error code sent you here, the [problem catalog](/problems) explains it."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"/reference/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"opentype","hasAudioNarration":false,"actualSubdomain":"opentype","customDomains":["docs.opentype.dev"],"gitSource":{"type":"github","owner":"opentypeai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ab5e652539070057e19e4e0","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"Reference","count":53},{"language":"default","tag":"Errors","count":47},{"language":"default","tag":"Problem codes","count":46},{"language":"default","tag":"API reference","count":24},{"language":"default","tag":"Guides","count":22},{"language":"default","tag":"Get started","count":10},{"language":"default","tag":"Overview","count":9},{"language":"default","tag":"Console","count":6},{"language":"default","tag":"Decision runs","count":6},{"language":"default","tag":"Spend and billing","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/keys/revoke","slug":"/api-reference/keys/revoke","pageMetadata":{"title":"Revoke an API key","description":"Revokes a key. It stops authenticating immediately. Requires `keys_write`.\n\nIdempotent: revoking a revoked key returns `200` with the original `revoked_at`. A revoked key is never deleted; it stays in the list with `state: \"revoked\"`.","deprecated":null,"version":null,"sidebarTitle":"Revoke","openapi":"/api-reference/openapi.json delete /v1/keys/{key_id}","href":"/api-reference/keys/revoke","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Revokes a key. It stops authenticating immediately. Requires \", _jsx(_components.code, {\n children: \"keys_write\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Idempotent: revoking a revoked key returns \", _jsx(_components.code, {\n children: \"200\"\n }), \" with the original \", _jsx(_components.code, {\n children: \"revoked_at\"\n }), \". A revoked key is never deleted; it stays in the list with \", _jsx(_components.code, {\n children: \"state: \\\"revoked\\\"\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Revoke an API key","description":"Revokes a key. It stops authenticating immediately. Requires `keys_write`.\n\nIdempotent: revoking a revoked key returns `200` with the original `revoked_at`. A revoked key is never deleted; it stays in the list with `state: \"revoked\"`.","deprecated":null,"version":null,"sidebarTitle":"Revoke","openapi":"/api-reference/openapi.json delete /v1/keys/{key_id}","href":"/api-reference/keys/revoke","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["keys"],"summary":"Revoke an API key","description":"Revokes a key. It stops authenticating immediately. Requires `keys_write`.\n\nIdempotent: revoking a revoked key returns `200` with the original `revoked_at`. A revoked key is never deleted; it stays in the list with `state: \"revoked\"`.","operationId":"revoke_key","parameters":["504a9641-bfc6-4026-91af-dd661637e58e"],"responses":{"200":"ab8e70bf-845f-4325-abd9-3d6b6e458412","401":"fa82da69-6509-46a5-83e4-e8d5349c365d","403":"3848da87-e054-4e60-87ca-530503d6c7db","404":"23190322-ad29-4252-a3f8-ccc3d8e335e4","503":"b35362c1-9f5a-4ed2-8814-83063ee01a82"},"security":["81b61f1f-329a-47a0-80c5-a044150012b9","2a861a3e-5ac4-4b56-819c-71ec975926aa"],"x-mint":{"href":"/api-reference/keys/revoke"},"method":"delete","type":"path","servers":["b9e51016-dc72-438c-8be7-eedb6c738623","7768c5d7-e6e0-4d85-aba6-bff93ad8e2a8"],"path":"/v1/keys/{key_id}","baseUrlOptions":["https://api.opentype.dev","https://api.opentype.dev"],"title":"Revoke an API key","codeSamples":[],"requestExampleLanguages":["bash","typescript","python"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"504a9641-bfc6-4026-91af-dd661637e58e":{"name":"key_id","in":"path","description":"The key's `id`: `key_` followed by 32 hex characters. Never the secret.","required":true,"schema":{"type":"string","isRequired":true,"description":"The key's `id`: `key_` followed by 32 hex characters. Never the secret.","uniqueKey":"","typeLabel":"string"}}},"responses":{"ab8e70bf-845f-4325-abd9-3d6b6e458412":{"description":"The key, now `revoked`.","content":{"application/json":{"schema":{"type":"object","description":"A key without its secret.","required":["id","name","principal","scopes","state","secret_prefix","created_by","created_at"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"principal":{"oneOf":[{"type":"object","description":"Who a key acts as: a user, or a service account owned by the organization.","required":["id","type"],"properties":{"id":{"type":"string","description":"The user's id.","isRequired":true,"uniqueKey":"principal.oneOf.0.id","typeLabel":"string"},"type":{"type":"string","enum":["user"],"isRequired":true,"uniqueKey":"principal.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"principal.oneOf.0","typeLabel":"object"},{"type":"object","description":"Who a key acts as: a user, or a service account owned by the organization.","required":["id","type"],"properties":{"id":{"type":"string","description":"An id you choose for the service account.","isRequired":true,"uniqueKey":"principal.oneOf.1.id","typeLabel":"string"},"type":{"type":"string","enum":["service_account"],"isRequired":true,"uniqueKey":"principal.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"principal.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"principal","typeLabel":"object"},"scopes":{"type":"array","items":{"type":"string","description":"A permission a key or session holds.","enum":["runs_read","runs_write","keys_read","keys_write","members_read","members_write","billing_read","billing_write","usage_read"],"uniqueKey":"scopes.items.[INDEX]","typeLabel":"enum\u003cstring>"},"isRequired":true,"uniqueKey":"scopes","typeLabel":"enum\u003cstring>[]"},"state":{"type":"string","description":"A revoked key is kept, never deleted.","enum":["active","revoked"],"isRequired":true,"uniqueKey":"state","typeLabel":"enum\u003cstring>"},"secret_prefix":{"type":"string","description":"The first 13 characters of the secret (`otsk_` plus 8), for display.","isRequired":true,"uniqueKey":"secret_prefix","typeLabel":"string"},"created_by":{"type":"string","isRequired":true,"uniqueKey":"created_by","typeLabel":"string"},"created_at":{"type":"string","isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"last_used_at":{"oneOf":[{"type":"string","uniqueKey":"last_used_at.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"last_used_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"last_used_at","typeLabel":"string | null"},"revoked_at":{"oneOf":[{"type":"string","uniqueKey":"revoked_at.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"revoked_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"revoked_at","typeLabel":"string | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","name":"\u003cstring>","principal":{"id":"\u003cstring>","type":"user"},"scopes":["runs_read"],"state":"active","secret_prefix":"\u003cstring>","created_by":"\u003cstring>","created_at":"\u003cstring>","last_used_at":"\u003cstring>","revoked_at":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"fa82da69-6509-46a5-83e4-e8d5349c365d":{"description":"`missing_credentials` (no bearer credential) or `invalid_credential` (malformed, unknown or revoked).","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"3848da87-e054-4e60-87ca-530503d6c7db":{"description":"`scope_denied`: the credential lacks `keys_write`. A session without an organization gets `no_active_organization`.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"23190322-ad29-4252-a3f8-ccc3d8e335e4":{"description":"`key_not_found`: no such key in your organization.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b35362c1-9f5a-4ed2-8814-83063ee01a82":{"description":"`database_not_configured` or `database_unavailable`. Also `auth_not_configured` or `trust_keys_unavailable` when credentials cannot be verified.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"81b61f1f-329a-47a0-80c5-a044150012b9":{"bearer":{"type":"http","scheme":"bearer","description":"An API key (otsk_ + 64 hex) or a console session token.","scopes":[]}},"2a861a3e-5ac4-4b56-819c-71ec975926aa":{"bearer":{"type":"http","scheme":"bearer","description":"An API key (otsk_ + 64 hex) or a console session token.","scopes":[]}}},"servers":{"b9e51016-dc72-438c-8be7-eedb6c738623":{"url":"https://api.opentype.dev","description":"Production"},"7768c5d7-e6e0-4d85-aba6-bff93ad8e2a8":{"url":"https://api.opentype.dev","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key (otsk_ + 64 hex) or a console session token.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key (otsk_ + 64 hex) or a console session token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key (otsk_ + 64 hex) or a console session token.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key (otsk_ + 64 hex) or a console session token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"opentype","siteName":"OpenType Docs","title":"Revoke an API key - OpenType Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-25T03:10:31.467Z","originalFileLocation":"api-reference/keys/revoke.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Revokes a key. It stops authenticating immediately. Requires keys_write. Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: \u0026quot;revoked\u0026quot;.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenType Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Revoke an API key - OpenType Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Revokes a key. It stops authenticating immediately. Requires keys_write. Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: \u0026quot;revoked\u0026quot;.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenType\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.opentype.dev/api-reference/keys/revoke\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://opentype.dev/og/docs.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Revoke an API key - OpenType Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Revokes a key. It stops authenticating immediately. Requires keys_write. Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: \u0026quot;revoked\u0026quot;.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://opentype.dev/og/docs.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/opentype/MGJu4GHwxVSFKXIS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenType Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0A7A3B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.opentype.dev/api-reference/keys/revoke\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/keys/revoke.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.opentype.dev/#organization\",\"name\":\"OpenType Docs\",\"url\":\"https://docs.opentype.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/opentype/nqaaLldDOctxoCbH/logo/light.svg?fit=max\u0026auto=format\u0026n=nqaaLldDOctxoCbH\u0026q=85\u0026s=73a92db185691378733575d262c4447f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.opentype.dev#website\",\"name\":\"OpenType Docs\",\"url\":\"https://docs.opentype.dev\",\"publisher\":{\"@id\":\"https://docs.opentype.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.opentype.dev/api-reference/keys/revoke#webpage\",\"url\":\"https://docs.opentype.dev/api-reference/keys/revoke\",\"name\":\"Revoke an API key\",\"description\":\"Revokes a key. It stops authenticating immediately. Requires keys_write. Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: \\\"revoked\\\".\",\"dateModified\":\"2026-09-25T03:10:31.467Z\",\"isPartOf\":{\"@id\":\"https://docs.opentype.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.opentype.dev/api-reference/keys/revoke#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.opentype.dev/api-reference/keys/revoke#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API keys\",\"item\":\"https://docs.opentype.dev/api-reference/keys/create\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Revoke an API key\",\"item\":\"https://docs.opentype.dev/api-reference/keys/revoke\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.opentype.dev/api-reference/keys/revoke#apireference\",\"headline\":\"Revoke an API key\",\"name\":\"Revoke an API key\",\"description\":\"Revokes a key. It stops authenticating immediately. Requires keys_write. Idempotent: revoking a revoked key returns 200 with the original revoked_at. A revoked key is never deleted; it stays in the list with state: \\\"revoked\\\".\",\"url\":\"https://docs.opentype.dev/api-reference/keys/revoke\",\"mainEntityOfPage\":{\"@id\":\"https://docs.opentype.dev/api-reference/keys/revoke#webpage\"},\"image\":\"https://opentype.dev/og/docs.png\",\"dateModified\":\"2026-09-25T03:10:31.467Z\",\"publisher\":{\"@id\":\"https://docs.opentype.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.opentype.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OpenType Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"OpenType Docs","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"clock-rotate-left","href":"/reference/changelog"}]},"tabs":[{"tab":"Get started","icon":"rocket","pages":[{"title":"Get started","href":""}]},{"tab":"Console","icon":"desktop","pages":[{"title":"Console","href":"/console"}]},{"tab":"Guides","icon":"book-open","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"Security","icon":"shield-halved","pages":[{"title":"Security","href":"/security"}]},{"tab":"Reference","icon":"book","pages":[{"title":"Reference","href":"/reference"}]},{"tab":"API reference","icon":"code","groups":[{"group":"Overview","icon":"compass","pages":[{"title":"API reference","sidebarTitle":"Introduction","icon":"code","href":"/api-reference/introduction"}]},{"group":"Runs","icon":"play","pages":[{"title":"Create a run","deprecated":null,"version":null,"sidebarTitle":"Create","openapi":"/api-reference/openapi.json post /v1/runs","href":"/api-reference/runs/create"},{"title":"List runs","deprecated":null,"version":null,"sidebarTitle":"List","openapi":"/api-reference/openapi.json get /v1/runs","href":"/api-reference/runs/list"},{"title":"Retrieve a run","deprecated":null,"version":null,"sidebarTitle":"Retrieve","openapi":"/api-reference/openapi.json get /v1/runs/{run_id}","href":"/api-reference/runs/retrieve"},{"title":"Stream a run","deprecated":null,"version":null,"sidebarTitle":"Stream","openapi":"/api-reference/openapi.json get /v1/runs/{run_id}/stream","href":"/api-reference/runs/stream"}]},{"group":"Model Router","icon":"route","pages":[{"title":"Select a model","deprecated":null,"version":null,"sidebarTitle":"Select","openapi":"/api-reference/openapi.json post /v1/router/select","href":"/api-reference/router/select"},{"title":"List task types","deprecated":null,"version":null,"sidebarTitle":"Task types","openapi":"/api-reference/openapi.json get /v1/router/task-types","href":"/api-reference/router/task-types"},{"title":"List router models","deprecated":null,"version":null,"sidebarTitle":"Models","openapi":"/api-reference/openapi.json get /v1/router/models","href":"/api-reference/router/models"}]},{"group":"API keys","icon":"key","pages":[{"title":"Create an API key","deprecated":null,"version":null,"sidebarTitle":"Create","openapi":"/api-reference/openapi.json post /v1/keys","href":"/api-reference/keys/create"},{"title":"List API keys","deprecated":null,"version":null,"sidebarTitle":"List","openapi":"/api-reference/openapi.json get /v1/keys","href":"/api-reference/keys/list"},{"title":"Retrieve an API key","deprecated":null,"version":null,"sidebarTitle":"Retrieve","openapi":"/api-reference/openapi.json get /v1/keys/{key_id}","href":"/api-reference/keys/retrieve"},{"title":"Rotate an API key","description":"Issues a new secret for the same key `id`, name and scopes, and returns it once. Requires `keys_write`.\n\nThe old secret stops working immediately; there is no overlap window. A revoked key cannot be rotated. See [Key rotation](/guides/key-rotation).","deprecated":null,"version":null,"sidebarTitle":"Rotate","openapi":"/api-reference/openapi.json post /v1/keys/{key_id}/rotate","href":"/api-reference/keys/rotate"},{"title":"Revoke an API key","deprecated":null,"version":null,"sidebarTitle":"Revoke","openapi":"/api-reference/openapi.json delete /v1/keys/{key_id}","href":"/api-reference/keys/revoke"}]},{"group":"Usage and quota","icon":"chart-line","pages":[{"title":"Usage rollup","description":"Run counts, tokens and spend for your organization over a window. Requires `usage_read`.\n\nThe window is half-open, `[start_at, end_at)`, and counts runs created inside it. Omit both bounds for the current UTC calendar month.","deprecated":null,"version":null,"sidebarTitle":"Rollup","openapi":"/api-reference/openapi.json get /v1/usage","href":"/api-reference/usage/rollup"},{"title":"Daily usage","deprecated":null,"version":null,"sidebarTitle":"Daily","openapi":"/api-reference/openapi.json get /v1/usage/daily","href":"/api-reference/usage/daily"},{"title":"Usage ledger","deprecated":null,"version":null,"sidebarTitle":"Ledger","openapi":"/api-reference/openapi.json get /v1/usage/ledger","href":"/api-reference/usage/ledger"},{"title":"Run usage","deprecated":null,"version":null,"sidebarTitle":"Run","openapi":"/api-reference/openapi.json get /v1/usage/runs/{run_id}","href":"/api-reference/usage/run"},{"title":"Quota","deprecated":null,"version":null,"sidebarTitle":"Quota","openapi":"/api-reference/openapi.json get /v1/quota","href":"/api-reference/usage/quota"}]},{"group":"Billing","icon":"credit-card","pages":[{"title":"Get billing","deprecated":null,"version":null,"sidebarTitle":"Get","openapi":"/api-reference/openapi.json get /v1/billing","href":"/api-reference/billing/get"},{"title":"Create a checkout","deprecated":null,"version":null,"sidebarTitle":"Checkout","openapi":"/api-reference/openapi.json post /v1/billing/checkout","href":"/api-reference/billing/checkout"},{"title":"Open the billing portal","deprecated":null,"version":null,"sidebarTitle":"Portal","openapi":"/api-reference/openapi.json post /v1/billing/portal","href":"/api-reference/billing/portal"},{"title":"Set auto-recharge","deprecated":null,"version":null,"sidebarTitle":"Auto recharge","openapi":"/api-reference/openapi.json put /v1/billing/auto-recharge","href":"/api-reference/billing/auto-recharge"}]},{"group":"Health","icon":"heart-pulse","pages":[{"title":"Liveness","deprecated":null,"version":null,"sidebarTitle":"Liveness","openapi":"/api-reference/openapi.json get /healthz","href":"/api-reference/health/liveness"},{"title":"Readiness","deprecated":null,"version":null,"sidebarTitle":"Readiness","openapi":"/api-reference/openapi.json get /readyz","href":"/api-reference/health/readiness"}]}]}]},"basePath":"","title":"Revoke an API key - OpenType Docs","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-C945cI-W.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}