Returned when the caller does not have permission to revoke API keys or is trying to revoke a key with a higher role than their own.
{ "detail": "Only admins and agent managers can revoke API keys"}
404 Not Found
Returned when the API key does not exist or does not belong to the current organization.
{ "detail": "API key not found or does not belong to this organization"}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Butter AI","colors":{"primary":"#F4A261","light":"#F4A261","dark":"#F4A261"},"logo":{"light":"https://mintcdn.com/butterai/Ud-rPhiTyKw71yav/logo/light.svg?fit=max\u0026auto=format\u0026n=Ud-rPhiTyKw71yav\u0026q=85\u0026s=5ca12106ac1879de080b978e704db2a3","dark":"https://mintcdn.com/butterai/Ud-rPhiTyKw71yav/logo/dark.svg?fit=max\u0026auto=format\u0026n=Ud-rPhiTyKw71yav\u0026q=85\u0026s=19a2c36c5ab3b594beffd0f9d8ea11fb"},"favicon":"/favicon.svg","navbar":{"links":[{"href":"mailto:support@getbutter.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.getbutter.ai"}},"footer":{"socials":{"x":"https://x.com/getbutter_ai","github":"https://github.com/getbutter-ai","linkedin":"https://linkedin.com/company/getbutter-ai"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Butter AI Home","icon":"home","href":"https://app.getbutter.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"butterai","hasAudioNarration":false,"actualSubdomain":"butterai","customDomains":["docs.getbutter.ai"],"gitSource":{"type":"github","owner":"shobhit122","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae944542ae3affd08073e73:success","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"API Reference","count":58},{"language":"default","tag":"Guides","count":21},{"language":"default","tag":"Agents","count":7},{"language":"default","tag":"Organizations","count":7},{"language":"default","tag":"Analytics","count":6},{"language":"default","tag":"Integrations","count":6},{"language":"default","tag":"Knowledge Base","count":6},{"language":"default","tag":"Tools","count":5},{"language":"default","tag":"Core Concepts","count":5},{"language":"default","tag":"Billing","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/api-keys/revoke","slug":"/api-reference/api-keys/revoke","pageMetadata":{"title":"Revoke API Key","api":"DELETE /api/api-keys/{key_id}","description":null,"href":"/api-reference/api-keys/revoke","hidden":false},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Expandable,Heading,ParamField,ResponseField}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Revoke an API key, preventing it from being used for future requests. Revoked keys remain in the list but with `,_jsx(_components.code,{children:`status: revoked`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsx(_components.p,{children:`Bearer token from Cognito authentication (JWT).`})}),`\n`,_jsx(ParamField,{header:`X-Organization-Id`,type:`string`,required:true,id:`param-x-organization-id`,children:_jsx(_components.p,{children:`The organization ID.`})}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`key_id`,type:`string`,required:true,id:`param-key-id`,children:_jsxs(_components.p,{children:[`The unique identifier of the API key (format: `,_jsx(_components.code,{children:`apikey_[a-f0-9]{12}`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`permissions`,children:`Permissions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Only `,_jsx(_components.code,{children:`admin`}),` and `,_jsx(_components.code,{children:`agent_manager`}),` roles can revoke API keys.`]}),`\n`,_jsx(_components.li,{children:`You cannot revoke a key with a higher role than your own.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Indicates if the request was successful.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Human-readable success message.`})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The revoked API key object.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`key_id`,type:`string`,id:`param-key-id-1`,children:_jsx(_components.p,{children:`Unique key identifier.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`The name of the API key.`})}),_jsx(ResponseField,{name:`role`,type:`string`,id:`param-role`,children:_jsx(_components.p,{children:`The role assigned to this key.`})}),_jsx(ResponseField,{name:`prefix`,type:`string`,id:`param-prefix`,children:_jsx(_components.p,{children:`The first 12 characters of the key.`})}),_jsx(ResponseField,{name:`client_id`,type:`string`,id:`param-client-id`,children:_jsx(_components.p,{children:`The organization ID this key belongs to.`})}),_jsx(ResponseField,{name:`user_id`,type:`string`,id:`param-user-id`,children:_jsx(_components.p,{children:`The user ID who created this key.`})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`The key status (`,_jsx(_components.code,{children:`revoked`}),`).`]})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of creation.`})}),_jsx(ResponseField,{name:`last_used_at`,type:`string`,id:`param-last-used-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of last usage.`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of expiration.`})})]})]}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Accordion,{title:`403 Forbidden`,id:`403-forbidden`,children:[_jsx(_components.p,{children:`Returned when the caller does not have permission to revoke API keys or is trying to revoke a key with a higher role than their own.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Only admins and agent managers can revoke API keys\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(Accordion,{title:`404 Not Found`,id:`404-not-found`,children:[_jsx(_components.p,{children:`Returned when the API key does not exist or does not belong to the current organization.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"API key not found or does not belong to this organization\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Revoke API Key","api":"DELETE /api/api-keys/{key_id}","description":null,"href":"/api-reference/api-keys/revoke","hidden":false}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Expandable,Heading,ParamField,ResponseExample,ResponseField}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Revoke an API key, preventing it from being used for future requests. Revoked keys remain in the list but with `,_jsx(_components.code,{children:`status: revoked`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsx(_components.p,{children:`Bearer token from Cognito authentication (JWT).`})}),`\n`,_jsx(ParamField,{header:`X-Organization-Id`,type:`string`,required:true,id:`param-x-organization-id`,children:_jsx(_components.p,{children:`The organization ID.`})}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`key_id`,type:`string`,required:true,id:`param-key-id`,children:_jsxs(_components.p,{children:[`The unique identifier of the API key (format: `,_jsx(_components.code,{children:`apikey_[a-f0-9]{12}`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`permissions`,children:`Permissions`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Only `,_jsx(_components.code,{children:`admin`}),` and `,_jsx(_components.code,{children:`agent_manager`}),` roles can revoke API keys.`]}),`\n`,_jsx(_components.li,{children:`You cannot revoke a key with a higher role than your own.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Indicates if the request was successful.`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Human-readable success message.`})}),`\n`,_jsxs(ResponseField,{name:`data`,type:`object`,id:`param-data`,children:[_jsx(_components.p,{children:`The revoked API key object.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`key_id`,type:`string`,id:`param-key-id-1`,children:_jsx(_components.p,{children:`Unique key identifier.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`The name of the API key.`})}),_jsx(ResponseField,{name:`role`,type:`string`,id:`param-role`,children:_jsx(_components.p,{children:`The role assigned to this key.`})}),_jsx(ResponseField,{name:`prefix`,type:`string`,id:`param-prefix`,children:_jsx(_components.p,{children:`The first 12 characters of the key.`})}),_jsx(ResponseField,{name:`client_id`,type:`string`,id:`param-client-id`,children:_jsx(_components.p,{children:`The organization ID this key belongs to.`})}),_jsx(ResponseField,{name:`user_id`,type:`string`,id:`param-user-id`,children:_jsx(_components.p,{children:`The user ID who created this key.`})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsxs(_components.p,{children:[`The key status (`,_jsx(_components.code,{children:`revoked`}),`).`]})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of creation.`})}),_jsx(ResponseField,{name:`last_used_at`,type:`string`,id:`param-last-used-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of last usage.`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp of expiration.`})})]})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`Response`,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"API key revoked successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"apikey_a1b2c3d4e5f6\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Production API Key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"agent_manager\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bk_live_xxxx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"client_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"org_abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"user_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user_def456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"revoked\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T10:30:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_used_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-01-15T14:45:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2025-12-31T23:59:59Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Accordion,{title:`403 Forbidden`,id:`403-forbidden`,children:[_jsx(_components.p,{children:`Returned when the caller does not have permission to revoke API keys or is trying to revoke a key with a higher role than their own.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Only admins and agent managers can revoke API keys\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsxs(Accordion,{title:`404 Not Found`,id:`404-not-found`,children:[_jsx(_components.p,{children:`Returned when the API key does not exist or does not belong to the current organization.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"API key not found or does not belong to this organization\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Revoke API Key","api":"DELETE /api/api-keys/{key_id}","description":null,"href":"/api-reference/api-keys/revoke","hidden":false}}}},"mdxExtracts":{"tableOfContents":[{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":3,"children":[]},{"title":"Permissions","slug":"permissions","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"Response","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"API key revoked successfully\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"key_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"apikey_a1b2c3d4e5f6\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Production API Key\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"agent_manager\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"prefix\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"bk_live_xxxx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"client_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"org_abc123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"user_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user_def456\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"revoked\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-15T10:30:00Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"last_used_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2024-01-15T14:45:00Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2025-12-31T23:59:59Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Revoke API Key","path":"/api/api-keys/{key_id}","method":"delete","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer token from Cognito authentication (JWT).","required":true}]},"X-Organization-Id":{"schema":[{"type":"string","description":"The organization ID.","required":true}]}},"cookie":{},"path":{"key_id":{"schema":[{"type":"string","description":"The unique identifier of the API key (format: `apikey_[a-f0-9]{12}` ).","required":true}]}}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"Indicates if the request was successful."}],"message":[{"type":"string","description":"Human-readable success message."}],"data":[{"type":"object","properties":{"key_id":[{"type":"string","description":"Unique key identifier."}],"name":[{"type":"string","description":"The name of the API key."}],"role":[{"type":"string","description":"The role assigned to this key."}],"prefix":[{"type":"string","description":"The first 12 characters of the key."}],"client_id":[{"type":"string","description":"The organization ID this key belongs to."}],"user_id":[{"type":"string","description":"The user ID who created this key."}],"status":[{"type":"string","description":"The key status ( `revoked` )."}],"created_at":[{"type":"string","description":"ISO 8601 timestamp of creation."}],"last_used_at":[{"type":"string","description":"ISO 8601 timestamp of last usage."}],"expires_at":[{"type":"string","description":"ISO 8601 timestamp of expiration."}]},"description":"The revoked API key object."}]}}],"examples":{"example":{"value":{"success":true,"message":"\u003cstring>","data":{"key_id":"\u003cstring>","name":"\u003cstring>","role":"\u003cstring>","prefix":"\u003cstring>","client_id":"\u003cstring>","user_id":"\u003cstring>","status":"\u003cstring>","created_at":"\u003cstring>","last_used_at":"\u003cstring>","expires_at":"\u003cstring>"}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"butterai","siteName":"Butter AI","title":"Revoke API Key - Butter AI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-11T06:45:33.551Z","originalFileLocation":"api-reference/api-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=\"application-name\" content=\"Butter AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_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/butterai/udssvDq4Ew37HL3p/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Revoke API Key - Butter AI\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Butter AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getbutter.ai/api-reference/api-keys/revoke\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://butterai.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Revoke+API+Key\u0026amp;theme=b37d15e429deef4541ad7c01\u0026amp;signature=5d27e58225a4149352d2b4af36f94812dc5652b72f1ba51fe8df3875541ec33e\">\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 API Key - Butter AI\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://butterai.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Revoke+API+Key\u0026amp;theme=b37d15e429deef4541ad7c01\u0026amp;signature=5d27e58225a4149352d2b4af36f94812dc5652b72f1ba51fe8df3875541ec33e\">\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/butterai/udssvDq4Ew37HL3p/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Butter AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F4A261\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getbutter.ai/api-reference/api-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/api-keys/revoke.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getbutter.ai/#organization\",\"name\":\"Butter AI\",\"url\":\"https://docs.getbutter.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/butterai/Ud-rPhiTyKw71yav/logo/light.svg?fit=max\u0026auto=format\u0026n=Ud-rPhiTyKw71yav\u0026q=85\u0026s=5ca12106ac1879de080b978e704db2a3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getbutter.ai#website\",\"name\":\"Butter AI\",\"url\":\"https://docs.getbutter.ai\",\"publisher\":{\"@id\":\"https://docs.getbutter.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke#webpage\",\"url\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke\",\"name\":\"Revoke API Key\",\"dateModified\":\"2026-03-11T06:45:33.551Z\",\"isPartOf\":{\"@id\":\"https://docs.getbutter.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Keys\",\"item\":\"https://docs.getbutter.ai/api-reference/api-keys/list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Revoke API Key\",\"item\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke#apireference\",\"headline\":\"Revoke API Key\",\"name\":\"Revoke API Key\",\"url\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getbutter.ai/api-reference/api-keys/revoke#webpage\"},\"dateModified\":\"2026-03-11T06:45:33.551Z\",\"publisher\":{\"@id\":\"https://docs.getbutter.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getbutter.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Butter AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Butter AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/api-keys/revoke.md","siteName":"Butter AI","nav":{"global":{"anchors":[{"anchor":"Butter AI Home","icon":"home","href":"https://app.getbutter.ai"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"Introduction","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Agents","pages":[{"title":"List Agents","api":"GET /api/agents","href":"/api-reference/agents/list"},{"title":"Create Agent","api":"POST /api/agents","href":"/api-reference/agents/create"},{"title":"Get Agent","api":"GET /api/agents/{agent_id}","href":"/api-reference/agents/get"},{"title":"Update Agent","api":"PUT /api/agents/{agent_id}","href":"/api-reference/agents/update"},{"title":"Delete Agent","api":"DELETE /api/agents/{agent_id}","href":"/api-reference/agents/delete"},{"title":"Assign Phone Number","api":"POST /api/agents/{agent_id}/assign-phone-number","href":"/api-reference/agents/assign-phone"},{"title":"Unassign Phone Number","api":"POST /api/agents/{agent_id}/unassign-phone-number/{phone_number_id}","href":"/api-reference/agents/unassign-phone"}]},{"group":"Phone Numbers","pages":[{"title":"List Phone Numbers","api":"GET /api/phone-numbers","href":"/api-reference/phone-numbers/list"},{"title":"Import Phone Number","api":"POST /api/phone-numbers","href":"/api-reference/phone-numbers/import"},{"title":"Get Phone Number","api":"GET /api/phone-numbers/{phone_number_id}","href":"/api-reference/phone-numbers/get"},{"title":"Delete Phone Number","api":"DELETE /api/phone-numbers/{phone_number_id}","href":"/api-reference/phone-numbers/delete"}]},{"group":"Calls","pages":[{"title":"Make Outbound Call","api":"POST /api/make-call","href":"/api-reference/calls/make-call"},{"title":"List Calls","api":"GET /api/calls","href":"/api-reference/calls/list"},{"title":"Get Call","api":"GET /api/calls/{call_sid}","href":"/api-reference/calls/get"},{"title":"Call Recording","href":"/api-reference/calls/recording"}]},{"group":"Knowledge Base","pages":[{"title":"List Documents","api":"GET /api/knowledge-base","href":"/api-reference/knowledge-base/list"},{"title":"Create Document","api":"POST /api/knowledge-base","href":"/api-reference/knowledge-base/create"},{"title":"Get Document","api":"GET /api/knowledge-base/{documentation_id}","href":"/api-reference/knowledge-base/get"},{"title":"Delete Document","api":"DELETE /api/knowledge-base/{documentation_id}","href":"/api-reference/knowledge-base/delete"},{"title":"Attach to Agent","api":"POST /api/knowledge-base/attach","href":"/api-reference/knowledge-base/attach"},{"title":"Detach from Agent","api":"POST /api/knowledge-base/detach","href":"/api-reference/knowledge-base/detach"}]},{"group":"Tools","pages":[{"title":"List Tools","api":"GET /api/tools","href":"/api-reference/tools/list"},{"title":"Create Tool","api":"POST /api/tools","href":"/api-reference/tools/create"},{"title":"Get Tool","api":"GET /api/tools/{tool_id}","href":"/api-reference/tools/get"},{"title":"Update Tool","api":"PUT /api/tools/{tool_id}","href":"/api-reference/tools/update"},{"title":"Delete Tool","api":"DELETE /api/tools/{tool_id}","href":"/api-reference/tools/delete"}]},{"group":"Organizations","pages":[{"title":"List Members","api":"GET /api/auth/organizations/members","href":"/api-reference/organizations/members-list"},{"title":"Remove Member","api":"DELETE /api/auth/organizations/members/{membership_id}","href":"/api-reference/organizations/member-remove"},{"title":"Update Member Role","api":"PUT /api/auth/organizations/members/{membership_id}/role","href":"/api-reference/organizations/member-role-update"},{"title":"Invite Member","api":"POST /api/auth/organizations/invite","href":"/api-reference/organizations/invite-create"},{"title":"List Invitations","api":"GET /api/auth/organizations/invitations","href":"/api-reference/organizations/invites-list"},{"title":"Cancel Invitation","api":"DELETE /api/auth/invitations/{invite_id}","href":"/api-reference/organizations/invite-cancel"},{"title":"Accept Invitation","api":"POST /api/auth/invitations/{invite_id}/accept","href":"/api-reference/organizations/invite-accept"}]},{"group":"Billing","pages":[{"title":"Get Billing Info","api":"GET /api/billing/info","href":"/api-reference/billing/info"},{"title":"Purchase Credits","api":"POST /api/billing/credits/purchase","href":"/api-reference/billing/purchase-credits"},{"title":"Subscribe to Plan","api":"POST /api/billing/subscribe","href":"/api-reference/billing/subscribe"},{"title":"Billing Portal","api":"POST /api/billing/portal","href":"/api-reference/billing/portal"}]},{"group":"Analytics","pages":[{"title":"Analytics Overview","href":"/api-reference/analytics/overview"},{"title":"Get Summary Analytics","api":"GET /api/analytics/summary","href":"/api-reference/analytics/summary"},{"title":"Get Daily Calls","api":"GET /api/analytics/calls/daily","href":"/api-reference/analytics/daily-calls"},{"title":"Get Daily Spend","api":"GET /api/analytics/spend/daily","href":"/api-reference/analytics/daily-spend"},{"title":"Get Agent Analytics","api":"GET /api/analytics/agents","href":"/api-reference/analytics/agents"},{"title":"Get Provider Breakdown","api":"GET /api/analytics/providers","href":"/api-reference/analytics/providers"}]},{"group":"Preview \u0026 Voice Selection","pages":[{"title":"Preview Agent Session","api":"POST /api/start/{agent_id}","href":"/api-reference/preview/testing"},{"title":"Search Voices","api":"GET /api/voices/search","href":"/api-reference/voices/search"},{"title":"ElevenLabs Voice Library","href":"/api-reference/voices/elevenlabs-library"},{"title":"Cartesia Voice Preview","api":"GET /api/voices/cartesia/{id}/preview","href":"/api-reference/voices/cartesia-preview"}]},{"group":"Integrations","pages":[{"title":"List Integrations","api":"GET /api/integrations","href":"/api-reference/integrations/list"},{"title":"Create Integration","api":"POST /api/integrations","href":"/api-reference/integrations/create"},{"title":"Get Integration","api":"GET /api/integrations/{integration_id}","href":"/api-reference/integrations/get"},{"title":"Update Integration","api":"PUT /api/integrations/{integration_id}","href":"/api-reference/integrations/update"},{"title":"Delete Integration","api":"DELETE /api/integrations/{integration_id}","href":"/api-reference/integrations/delete"},{"title":"Validate Integration","api":"POST /api/integrations/{integration_id}/validate","href":"/api-reference/integrations/validate"}]},{"group":"API Keys","pages":[{"title":"List API Keys","api":"GET /api/api-keys","href":"/api-reference/api-keys/list"},{"title":"Create API Key","api":"POST /api/api-keys","description":null,"href":"/api-reference/api-keys/create"},{"title":"Revoke API Key","api":"DELETE /api/api-keys/{key_id}","href":"/api-reference/api-keys/revoke"}]}]}]},"basePath":"","title":"Revoke API Key - Butter AI","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C6Z1vAfX.js","snippetPresets-Bjd6OXRM.js","utils-QL6OhUyF.js","style-to-object-BY3JEAdk.js","utils-Dsq-HLeF.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-CEYfmkoV.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CHgPjMM8.js","_Uint8Array-IXRJ_ueo.js","isObject-FP1Yky1u.js","ApiExamples-pq4ns9YA.js","usePlaygroundInputsStore-D-gnigmo.js","shallow-DIfWGPrf.js","isEqual-DDFuixlH.js","CodeSnippets-8g5rilZj.js","CodeSnippet-C_J7pouP.js","use-playground-group-access-bkOyfPao.js","Page-B_smDgrp.js","api-description-markdown-DtcP2u3s.js","DynamicMarkdown-DOefW1_8.js","SectionHeading-Cg4lfWZw.js","MethodPill-BnqygvYm.js","getPastedJson-BGXYEZ3P.js","Check2Icon-BBeO3TOS.js","axios-CsQoIw0U.js"]}