Changes a key’s name and/or permissions in place. The key material is untouched, so agents that already hold the key keep working with the new rules on their next call. Use this to tighten an allow-list, add a spend cap, or turn on the confirmation requirement for destructive calls without re-pasting a new secret into every agent config.Permissions are replaced as a whole. To change one field, read the key first (GET /v1/api-keys) and send the full object back with the change.Auth: JWT (dashboard) or an API key belonging to the same account.
Path Parameters
string
required
The API key UUID to update
Body
Send at least one field.
string
New display name. Leading and trailing whitespace is trimmed; an empty name is rejected.
object
Replacement permissions. Send {} (or an object whose fields are all null) for full access.
Show Permissions object
string[] | null
Service UUIDs this key may call. null means all services.
string[] | null
Tool UUIDs this key may call. null means all tools. Services and tools are combined with OR.
integer | null
Refuse any single call priced above this amount.
integer | null
Refuse calls once the key’s spend for the current UTC day would exceed this amount.
boolean | null
When true, destructive tool calls (non-GET methods, or tools flagged destructive) return 409 confirmation_required with a short-lived confirm_token; the call goes through only when it is repeated with that token. The token is bound to the key, the tool and the exact arguments, and expires after five minutes.
string
Name of the agent this key belongs to
string
One of coding_agent, assistant, workflow, service, other
string
One line on what the key is for
Response
The updated key, in the same shape as GET /v1/api-keys. The secret is never returned here.
string
API key UUID
string
First 8 characters of the key
string
Key name
string
Creation timestamp
string
Last usage timestamp
object
Permissions as stored. null means unrestricted.
Errors
Status
Meaning
400
Empty body, or an empty name
404
No active key with that id belongs to this account
Every update is recorded in the audit log as key.update with the list of changed fields.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Danube","colors":{"primary":"#177EBC","light":"#177EBC","dark":"#177EBC"},"logo":{"light":"https://mintcdn.com/danube/rODiJlJdIDqSBKXh/images/hero.png?fit=max\u0026auto=format\u0026n=rODiJlJdIDqSBKXh\u0026q=85\u0026s=f4cba3d80e8c521e27273c4e245cfea4","dark":"https://mintcdn.com/danube/rODiJlJdIDqSBKXh/images/hero.png?fit=max\u0026auto=format\u0026n=rODiJlJdIDqSBKXh\u0026q=85\u0026s=f4cba3d80e8c521e27273c4e245cfea4","href":"https://danubeai.com"},"favicon":"https://mintcdn.com/danube/rODiJlJdIDqSBKXh/Danube_icon.png?fit=max\u0026auto=format\u0026n=rODiJlJdIDqSBKXh\u0026q=85\u0026s=946a64b7cd661838d30c71564a63532e","navbar":{"links":[{"href":"mailto:support@danubeai.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://danubeai.com/dashboard"}},"footer":{"socials":{"x":"https://x.com/danubeai","linkedin":"https://linkedin.com/company/danubeai"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Dashboard","icon":"browser","href":"https://danubeai.com/dashboard"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"danube","hasAudioNarration":false,"actualSubdomain":"danube","customDomains":["docs.danubeai.com"],"gitSource":{"type":"github","owner":"danubeai","repo":"danube","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae73266039e90b0fea205c4","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"API Reference","count":72},{"language":"default","tag":"Documentation","count":60},{"language":"default","tag":"Infrastructure Connectors","count":19},{"language":"default","tag":"Tools","count":12},{"language":"default","tag":"SDKs \u0026 Integrations","count":11},{"language":"default","tag":"Skills","count":9},{"language":"default","tag":"Organizations \u0026 Governance","count":9},{"language":"default","tag":"Workflows","count":8},{"language":"default","tag":"Services","count":8},{"language":"default","tag":"MCP Clients","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"workos-onboarding","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":"site-roles","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":"assistant-v5","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":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","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":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/endpoint/update_api_key","slug":"/api-reference/endpoint/update_api_key","pageMetadata":{"title":"Update API Key","api":"PATCH /v1/api-keys/{key_id}","description":"Rename an API key or replace its permissions without rotating the secret","href":"/api-reference/endpoint/update_api_key"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Rename an API key or replace its permissions without rotating the secret\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Changes a key’s name and/or permissions in place. The key material is untouched, so agents that already hold the key keep working with the new rules on their next call. Use this to tighten an allow-list, add a spend cap, or turn on the confirmation requirement for destructive calls without re-pasting a new secret into every agent config.`}),`\n`,_jsxs(_components.p,{children:[`Permissions are replaced as a whole. To change one field, read the key first (`,_jsx(_components.code,{children:`GET /v1/api-keys`}),`) and send the full object back with the change.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Auth:`}),` JWT (dashboard) or an API key belonging to the same account.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`key_id`,type:`string`,required:true,id:`param-key-id`,children:_jsx(_components.p,{children:`The API key UUID to update`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(_components.p,{children:`Send at least one field.`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`New display name. Leading and trailing whitespace is trimmed; an empty name is rejected.`})}),`\n`,_jsxs(ParamField,{body:`permissions`,type:`object`,id:`param-permissions`,children:[_jsxs(_components.p,{children:[`Replacement permissions. Send `,_jsx(_components.code,{children:`{}`}),` (or an object whose fields are all `,_jsx(_components.code,{children:`null`}),`) for full access.`]}),_jsxs(Expandable,{title:`Permissions object`,children:[_jsx(ParamField,{body:`allowed_services`,type:`string[] | null`,id:`param-allowed-services`,children:_jsxs(_components.p,{children:[`Service UUIDs this key may call. `,_jsx(_components.code,{children:`null`}),` means all services.`]})}),_jsx(ParamField,{body:`allowed_tools`,type:`string[] | null`,id:`param-allowed-tools`,children:_jsxs(_components.p,{children:[`Tool UUIDs this key may call. `,_jsx(_components.code,{children:`null`}),` means all tools. Services and tools are combined with OR.`]})}),_jsx(ParamField,{body:`max_spend_per_call_cents`,type:`integer | null`,id:`param-max-spend-per-call-cents`,children:_jsx(_components.p,{children:`Refuse any single call priced above this amount.`})}),_jsx(ParamField,{body:`max_spend_per_day_cents`,type:`integer | null`,id:`param-max-spend-per-day-cents`,children:_jsx(_components.p,{children:`Refuse calls once the key’s spend for the current UTC day would exceed this amount.`})}),_jsx(ParamField,{body:`require_confirmation`,type:`boolean | null`,id:`param-require-confirmation`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, destructive tool calls (non-GET methods, or tools flagged destructive) return `,_jsx(_components.code,{children:`409 confirmation_required`}),` with a short-lived `,_jsx(_components.code,{children:`confirm_token`}),`; the call goes through only when it is repeated with that token. The token is bound to the key, the tool and the exact arguments, and expires after five minutes.`]})})]})]}),`\n`,_jsx(ParamField,{body:`agent_name`,type:`string`,id:`param-agent-name`,children:_jsx(_components.p,{children:`Name of the agent this key belongs to`})}),`\n`,_jsx(ParamField,{body:`agent_type`,type:`string`,id:`param-agent-type`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`coding_agent`}),`, `,_jsx(_components.code,{children:`assistant`}),`, `,_jsx(_components.code,{children:`workflow`}),`, `,_jsx(_components.code,{children:`service`}),`, `,_jsx(_components.code,{children:`other`})]})}),`\n`,_jsx(ParamField,{body:`purpose`,type:`string`,id:`param-purpose`,children:_jsx(_components.p,{children:`One line on what the key is for`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`The updated key, in the same shape as `,_jsx(_components.code,{children:`GET /v1/api-keys`}),`. The secret is never returned here.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:`API key UUID`}),`\n`,_jsx(ResponseField,{name:`key_prefix`,type:`string`,id:`param-key-prefix`,children:`First 8 characters of the key`}),`\n`,_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:`Key name`}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:`Creation timestamp`}),`\n`,_jsx(ResponseField,{name:`last_used`,type:`string`,id:`param-last-used`,children:`Last usage timestamp`}),`\n`,_jsxs(ResponseField,{name:`permissions`,type:`object`,id:`param-permissions-1`,children:[`Permissions as stored. `,_jsx(_components.code,{children:`null`}),` means unrestricted.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Empty body, or an empty name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`No active key with that id belongs to this account`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Every update is recorded in the audit log as `,_jsx(_components.code,{children:`key.update`}),` with the list of changed fields.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`})]})}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":"Update API Key","api":"PATCH /v1/api-keys/{key_id}","description":"Rename an API key or replace its permissions without rotating the secret","href":"/api-reference/endpoint/update_api_key"}}},"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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Changes a key’s name and/or permissions in place. The key material is untouched, so agents that already hold the key keep working with the new rules on their next call. Use this to tighten an allow-list, add a spend cap, or turn on the confirmation requirement for destructive calls without re-pasting a new secret into every agent config.`}),`\n`,_jsxs(_components.p,{children:[`Permissions are replaced as a whole. To change one field, read the key first (`,_jsx(_components.code,{children:`GET /v1/api-keys`}),`) and send the full object back with the change.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Auth:`}),` JWT (dashboard) or an API key belonging to the same account.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`key_id`,type:`string`,required:true,id:`param-key-id`,children:_jsx(_components.p,{children:`The API key UUID to update`})}),`\n`,_jsx(Heading,{level:`2`,id:`body`,children:`Body`}),`\n`,_jsx(_components.p,{children:`Send at least one field.`}),`\n`,_jsx(ParamField,{body:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`New display name. Leading and trailing whitespace is trimmed; an empty name is rejected.`})}),`\n`,_jsxs(ParamField,{body:`permissions`,type:`object`,id:`param-permissions`,children:[_jsxs(_components.p,{children:[`Replacement permissions. Send `,_jsx(_components.code,{children:`{}`}),` (or an object whose fields are all `,_jsx(_components.code,{children:`null`}),`) for full access.`]}),_jsxs(Expandable,{title:`Permissions object`,children:[_jsx(ParamField,{body:`allowed_services`,type:`string[] | null`,id:`param-allowed-services`,children:_jsxs(_components.p,{children:[`Service UUIDs this key may call. `,_jsx(_components.code,{children:`null`}),` means all services.`]})}),_jsx(ParamField,{body:`allowed_tools`,type:`string[] | null`,id:`param-allowed-tools`,children:_jsxs(_components.p,{children:[`Tool UUIDs this key may call. `,_jsx(_components.code,{children:`null`}),` means all tools. Services and tools are combined with OR.`]})}),_jsx(ParamField,{body:`max_spend_per_call_cents`,type:`integer | null`,id:`param-max-spend-per-call-cents`,children:_jsx(_components.p,{children:`Refuse any single call priced above this amount.`})}),_jsx(ParamField,{body:`max_spend_per_day_cents`,type:`integer | null`,id:`param-max-spend-per-day-cents`,children:_jsx(_components.p,{children:`Refuse calls once the key’s spend for the current UTC day would exceed this amount.`})}),_jsx(ParamField,{body:`require_confirmation`,type:`boolean | null`,id:`param-require-confirmation`,children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, destructive tool calls (non-GET methods, or tools flagged destructive) return `,_jsx(_components.code,{children:`409 confirmation_required`}),` with a short-lived `,_jsx(_components.code,{children:`confirm_token`}),`; the call goes through only when it is repeated with that token. The token is bound to the key, the tool and the exact arguments, and expires after five minutes.`]})})]})]}),`\n`,_jsx(ParamField,{body:`agent_name`,type:`string`,id:`param-agent-name`,children:_jsx(_components.p,{children:`Name of the agent this key belongs to`})}),`\n`,_jsx(ParamField,{body:`agent_type`,type:`string`,id:`param-agent-type`,children:_jsxs(_components.p,{children:[`One of `,_jsx(_components.code,{children:`coding_agent`}),`, `,_jsx(_components.code,{children:`assistant`}),`, `,_jsx(_components.code,{children:`workflow`}),`, `,_jsx(_components.code,{children:`service`}),`, `,_jsx(_components.code,{children:`other`})]})}),`\n`,_jsx(ParamField,{body:`purpose`,type:`string`,id:`param-purpose`,children:_jsx(_components.p,{children:`One line on what the key is for`})}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsxs(_components.p,{children:[`The updated key, in the same shape as `,_jsx(_components.code,{children:`GET /v1/api-keys`}),`. The secret is never returned here.`]}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:`API key UUID`}),`\n`,_jsx(ResponseField,{name:`key_prefix`,type:`string`,id:`param-key-prefix`,children:`First 8 characters of the key`}),`\n`,_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-1`,children:`Key name`}),`\n`,_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:`Creation timestamp`}),`\n`,_jsx(ResponseField,{name:`last_used`,type:`string`,id:`param-last-used`,children:`Last usage timestamp`}),`\n`,_jsxs(ResponseField,{name:`permissions`,type:`object`,id:`param-permissions-1`,children:[`Permissions as stored. `,_jsx(_components.code,{children:`null`}),` means unrestricted.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`400`}),_jsx(_components.td,{children:`Empty body, or an empty name`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`404`}),_jsx(_components.td,{children:`No active key with that id belongs to this account`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Every update is recorded in the audit log as `,_jsx(_components.code,{children:`key.update`}),` with the list of changed fields.`]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsx(RequestExample,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`12`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PATCH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.danubeai.com/v1/api-keys/key_abc123\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"permissions\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"allowed_services\": [\"service_uuid_1\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"allowed_tools\": null,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_spend_per_call_cents\": null,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_spend_per_day_cents\": 500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"require_confirmation\": true`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:``,numberOfLines:`14`,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:`14`,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:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"key_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:` \"key_prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"nQ3vX8pK\"`}),_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:`\"My Production 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:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-01-15T10:00: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\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-09-01T18:22:10Z\"`}),_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:` \"permissions\"`}),_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:` \"allowed_services\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"service_uuid_1\"`}),_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:` \"allowed_tools\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"max_spend_per_call_cents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"max_spend_per_day_cents\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`500`}),_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:` \"require_confirmation\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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`]})})})})]})}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":"Update API Key","api":"PATCH /v1/api-keys/{key_id}","description":"Rename an API key or replace its permissions without rotating the secret","href":"/api-reference/endpoint/update_api_key"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Body","slug":"body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","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=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"12\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> PATCH\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api.danubeai.com/v1/api-keys/key_abc123\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer YOUR_JWT_TOKEN\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"permissions\": {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"allowed_services\": [\"service_uuid_1\"],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"allowed_tools\": null,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_spend_per_call_cents\": null,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_spend_per_day_cents\": 500,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"require_confirmation\": true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"","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=\"14\">\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\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"key_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\"> \"key_prefix\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"nQ3vX8pK\"\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\">\"My Production 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\"> \"created_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-01-15T10:00: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\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-09-01T18:22:10Z\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"permissions\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"allowed_services\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"service_uuid_1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"allowed_tools\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"max_spend_per_call_cents\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"max_spend_per_day_cents\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">500\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"require_confirmation\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\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":"Update API Key","path":"/v1/api-keys/{key_id}","method":"patch","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{"key_id":{"schema":[{"type":"string","description":"The API key UUID to update","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"name":[{"type":"string","description":"New display name. Leading and trailing whitespace is trimmed; an empty name is rejected."}],"permissions":[{"type":"object","properties":{"allowed_services":[{"type":"object","properties":{},"description":"Service UUIDs this key may call. `null` means all services."}],"allowed_tools":[{"type":"object","properties":{},"description":"Tool UUIDs this key may call. `null` means all tools. Services and tools are combined with OR."}],"max_spend_per_call_cents":[{"type":"object","properties":{},"description":"Refuse any single call priced above this amount."}],"max_spend_per_day_cents":[{"type":"object","properties":{},"description":"Refuse calls once the key’s spend for the current UTC day would exceed this amount."}],"require_confirmation":[{"type":"object","properties":{},"description":"When `true` , destructive tool calls (non-GET methods, or tools flagged destructive) return `409 confirmation_required` with a short-lived `confirm_token` ; the call goes through only when it is repeated with that token. The token is bound to the key, the tool and the exact arguments, and expires after five minutes."}]},"description":"Replacement permissions. Send `{}` (or an object whose fields are all `null` ) for full access."}],"agent_name":[{"type":"string","description":"Name of the agent this key belongs to"}],"agent_type":[{"type":"string","description":"One of `coding_agent` , `assistant` , `workflow` , `service` , `other`"}],"purpose":[{"type":"string","description":"One line on what the key is for"}]}}],"examples":{"example":{"value":{"name":"\u003cstring>","permissions":{"allowed_services":{},"allowed_tools":{},"max_spend_per_call_cents":{},"max_spend_per_day_cents":{},"require_confirmation":{}},"agent_name":"\u003cstring>","agent_type":"\u003cstring>","purpose":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"API key UUID"}],"key_prefix":[{"type":"string","description":"First 8 characters of the key"}],"name":[{"type":"string","description":"Key name"}],"created_at":[{"type":"string","description":"Creation timestamp"}],"last_used":[{"type":"string","description":"Last usage timestamp"}],"permissions":[{"type":"object","properties":{},"description":"Permissions as stored. `null` means unrestricted."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","key_prefix":"\u003cstring>","name":"\u003cstring>","created_at":"\u003cstring>","last_used":"\u003cstring>","permissions":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"danube","siteName":"Danube","title":"Update API Key - Danube","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-12T17:31:52.562Z","originalFileLocation":"api-reference/endpoint/update_api_key.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=\"Rename an API key or replace its permissions without rotating the secret\">\u003cmeta data-mint-head name=\"application-name\" content=\"Danube\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_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/danube/Uwuo-iO2_Nq0x2cb/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update API Key - Danube\">\u003cmeta data-mint-head property=\"og:description\" content=\"Rename an API key or replace its permissions without rotating the secret\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Danube\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.danubeai.com/api-reference/endpoint/update_api_key\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://danube.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Update+API+Key\u0026amp;description=Rename+an+API+key+or+replace+its+permissions+without+rotating+the+secret\u0026amp;theme=aecfda775d536aadf2ecc319\u0026amp;signature=5a80cb9eb614a0c482863e1665e29987687de94bc5ff8bfb57aab6f0c433a8ce\">\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=\"Update API Key - Danube\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Rename an API key or replace its permissions without rotating the secret\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://danube.mintlify.site/_mintlify/api/og/v2?division=API+Keys\u0026amp;title=Update+API+Key\u0026amp;description=Rename+an+API+key+or+replace+its+permissions+without+rotating+the+secret\u0026amp;theme=aecfda775d536aadf2ecc319\u0026amp;signature=5a80cb9eb614a0c482863e1665e29987687de94bc5ff8bfb57aab6f0c433a8ce\">\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/danube/Uwuo-iO2_Nq0x2cb/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Danube\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#177EBC\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.danubeai.com/api-reference/endpoint/update_api_key\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/update_api_key.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.danubeai.com/#organization\",\"name\":\"Danube\",\"url\":\"https://docs.danubeai.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/danube/rODiJlJdIDqSBKXh/images/hero.png?fit=max\u0026auto=format\u0026n=rODiJlJdIDqSBKXh\u0026q=85\u0026s=f4cba3d80e8c521e27273c4e245cfea4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.danubeai.com#website\",\"name\":\"Danube\",\"url\":\"https://docs.danubeai.com\",\"publisher\":{\"@id\":\"https://docs.danubeai.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key#webpage\",\"url\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key\",\"name\":\"Update API Key\",\"description\":\"Rename an API key or replace its permissions without rotating the secret\",\"dateModified\":\"2026-09-12T17:31:52.562Z\",\"isPartOf\":{\"@id\":\"https://docs.danubeai.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Keys\",\"item\":\"https://docs.danubeai.com/api-reference/endpoint/list_api_keys\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update API Key\",\"item\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key#apireference\",\"headline\":\"Update API Key\",\"name\":\"Update API Key\",\"description\":\"Rename an API key or replace its permissions without rotating the secret\",\"url\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key\",\"mainEntityOfPage\":{\"@id\":\"https://docs.danubeai.com/api-reference/endpoint/update_api_key#webpage\"},\"dateModified\":\"2026-09-12T17:31:52.562Z\",\"publisher\":{\"@id\":\"https://docs.danubeai.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.danubeai.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Danube\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Danube\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/update_api_key.md","siteName":"Danube","nav":{"global":{"anchors":[{"anchor":"Dashboard","icon":"browser","href":"https://danubeai.com/dashboard"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"group":"Tools","pages":[{"title":"List Tools","openapi":"GET /tools","href":"/api-reference/endpoint/list_tools"},{"title":"Search Tools","openapi":"GET /tools/search","href":"/api-reference/endpoint/search_tools"},{"title":"Get Tool by ID","openapi":"GET /tools/{tool_id}","href":"/api-reference/endpoint/get_tool"},{"title":"Get Tool by Name","openapi":"GET /tools/name/{tool_name}","href":"/api-reference/endpoint/get_tool_by_name"},{"title":"Call Tool","openapi":"POST /tools/call/{tool_id}","href":"/api-reference/endpoint/call_tools"},{"title":"Batch Call Tools","api":"POST /v1/tools/call/batch","href":"/api-reference/endpoint/batch_call_tools"},{"title":"Report Tool","api":"POST /v1/tools/{tool_id}/report","href":"/api-reference/endpoint/report_tool"},{"title":"Get Recommendations","api":"GET /v1/tools/recommended","href":"/api-reference/endpoint/get_recommendations"},{"title":"Describe Tool","api":"GET /v1/tools/{tool_id}/describe","href":"/api-reference/endpoint/describe_tool"},{"title":"Get Execution Result","api":"GET /v1/tools/executions/{execution_id}/result","href":"/api-reference/endpoint/get_execution_result"},{"title":"Public Search Tools","api":"GET /v1/tools/public/search","href":"/api-reference/endpoint/public_search_tools"},{"title":"Try Public Tool","api":"POST /v1/tools/public/{tool_id}/try","href":"/api-reference/endpoint/try_public_tool"}]},{"group":"Services","pages":[{"title":"List Services","openapi":"GET /services/public","href":"/api-reference/endpoint/list_services"},{"title":"Get Service","openapi":"GET /services/public/{service_id}","href":"/api-reference/endpoint/get_service"},{"title":"Get Service Tools","openapi":"GET /services/public/{service_id}/tools","href":"/api-reference/endpoint/get_service_tools"},{"title":"List Services (Authenticated)","api":"GET /v1/services","href":"/api-reference/endpoint/list_my_services"},{"title":"Get Service Tools (Authenticated)","api":"GET /v1/services/{service_id}/tools","href":"/api-reference/endpoint/list_service_tools_authed"},{"title":"Get Parameter Defaults","api":"GET /v1/services/{service_id}/parameter-defaults","href":"/api-reference/endpoint/get_parameter_defaults"},{"title":"Set Parameter Defaults","api":"PUT /v1/services/{service_id}/parameter-defaults","href":"/api-reference/endpoint/set_parameter_defaults"},{"title":"Delete Parameter Defaults","api":"DELETE /v1/services/{service_id}/parameter-defaults","href":"/api-reference/endpoint/delete_parameter_defaults"}]},{"group":"Skills","pages":[{"title":"List Skills","api":"GET /v1/skills","href":"/api-reference/endpoint/list_skills"},{"title":"Search Skills","api":"GET /v1/skills/search","href":"/api-reference/endpoint/search_skills"},{"title":"Get Skill","api":"GET /v1/skills/{skill_id}","href":"/api-reference/endpoint/get_skill"},{"title":"Create Skill","api":"POST /v1/skills","href":"/api-reference/endpoint/create_skill"},{"title":"Update Skill","api":"PATCH /v1/skills/{skill_id}","href":"/api-reference/endpoint/update_skill"},{"title":"Delete Skill","api":"DELETE /v1/skills/{skill_id}","href":"/api-reference/endpoint/delete_skill"},{"title":"List My Skills","api":"GET /v1/skills/my","href":"/api-reference/endpoint/list_my_skills"},{"title":"List Service Skills","api":"GET /v1/skills/service/{service_id}","href":"/api-reference/endpoint/list_service_skills"},{"title":"Validate Skill","api":"POST /v1/skills/validate","href":"/api-reference/endpoint/validate_skill"}]},{"group":"Skill Submissions","pages":[{"title":"Submit Skill for Review","api":"POST /v1/skill-submissions","href":"/api-reference/endpoint/submit_skill"},{"title":"List My Skill Submissions","api":"GET /v1/skill-submissions/my","href":"/api-reference/endpoint/list_my_skill_submissions"},{"title":"Get Skill Submission","api":"GET /v1/skill-submissions/{submission_id}","href":"/api-reference/endpoint/get_skill_submission"},{"title":"Cancel Skill Submission","api":"DELETE /v1/skill-submissions/{submission_id}","href":"/api-reference/endpoint/cancel_skill_submission"}]},{"group":"Workflows","pages":[{"title":"List Public Workflows","api":"GET /v1/workflows/public","href":"/api-reference/endpoint/list_public_workflows"},{"title":"List My Workflows","api":"GET /v1/workflows/my","href":"/api-reference/endpoint/list_my_workflows"},{"title":"Create Workflow","api":"POST /v1/workflows","href":"/api-reference/endpoint/create_workflow"},{"title":"Get Workflow","api":"GET /v1/workflows/{workflow_id}","href":"/api-reference/endpoint/get_workflow"},{"title":"Update Workflow","api":"PATCH /v1/workflows/{workflow_id}","href":"/api-reference/endpoint/update_workflow"},{"title":"Delete Workflow","api":"DELETE /v1/workflows/{workflow_id}","href":"/api-reference/endpoint/delete_workflow"},{"title":"Execute Workflow","api":"POST /v1/workflows/{workflow_id}/execute","href":"/api-reference/endpoint/execute_workflow"},{"title":"Get Workflow Execution","api":"GET /v1/workflows/executions/{execution_id}","href":"/api-reference/endpoint/get_workflow_execution"}]},{"group":"Ratings","pages":[{"title":"Get Tool Ratings","api":"GET /v1/ratings/tool/{tool_id}","href":"/api-reference/endpoint/get_tool_ratings"},{"title":"Submit Rating","api":"POST /v1/ratings","href":"/api-reference/endpoint/submit_rating"},{"title":"Get My Rating","api":"GET /v1/ratings/my/{tool_id}","href":"/api-reference/endpoint/get_my_rating"}]},{"group":"Wallet","pages":[{"title":"Get Wallet Balance","api":"GET /v1/wallet/balance","href":"/api-reference/endpoint/get_wallet_balance"},{"title":"Get Spending Limits","api":"GET /v1/x402/settings","href":"/api-reference/endpoint/get_spending_limits"},{"title":"Update Spending Limits","api":"PUT /v1/x402/settings","href":"/api-reference/endpoint/update_spending_limits"},{"title":"Get Wallet Transactions","api":"GET /v1/wallet/transactions","href":"/api-reference/endpoint/get_wallet_transactions"}]},{"group":"Credentials","pages":[{"title":"Store Credential","api":"POST /v1/credentials/store","href":"/api-reference/endpoint/store_credential"}]},{"group":"Context","pages":[{"title":"Get Context","api":"GET /v1/context","href":"/api-reference/endpoint/get_context"},{"title":"Upsert Personal Context","api":"POST /v1/context/personal/upsert","href":"/api-reference/endpoint/upsert_personal_context"}]},{"group":"API Keys","pages":[{"title":"List API Keys","api":"GET /v1/api-keys","href":"/api-reference/endpoint/list_api_keys"},{"title":"Create API Key","api":"POST /v1/api-keys","href":"/api-reference/endpoint/create_api_key"},{"title":"Rotate API Key","api":"POST /v1/api-keys/{key_id}/rotate","description":"Rotate an API key, generating new key material while preserving name and permissions","href":"/api-reference/endpoint/rotate_api_key"},{"title":"Update API Key","api":"PATCH /v1/api-keys/{key_id}","href":"/api-reference/endpoint/update_api_key"},{"title":"Get API Key Usage","api":"GET /v1/api-keys/{key_id}/usage","description":"Calls, success rate, latency, spend and top tools for one API key over a window of days","href":"/api-reference/endpoint/get_api_key_usage"},{"title":"Revoke API Key","api":"DELETE /v1/api-keys/{key_id}","href":"/api-reference/endpoint/revoke_api_key"}]},{"group":"Agents","pages":[{"title":"Register Agent","api":"POST /v1/agents","href":"/api-reference/endpoint/register_agent"},{"title":"Agent Getting Started","api":"GET /v1/agents/getting-started","href":"/api-reference/endpoint/agent_getting_started"},{"title":"Get Agent Info","api":"GET /v1/agents/me","href":"/api-reference/endpoint/get_agent_me"},{"title":"Fund Agent Wallet","api":"POST /v1/agents/wallets/fund","href":"/api-reference/endpoint/fund_agent_wallet"}]},{"group":"Webhooks","pages":[{"title":"List Webhooks","api":"GET /v1/webhooks","href":"/api-reference/endpoint/list_webhooks"},{"title":"Create Webhook","api":"POST /v1/webhooks","href":"/api-reference/endpoint/create_webhook"},{"title":"Update Webhook","api":"PATCH /v1/webhooks/{webhook_id}","href":"/api-reference/endpoint/update_webhook"},{"title":"Delete Webhook","api":"DELETE /v1/webhooks/{webhook_id}","href":"/api-reference/endpoint/delete_webhook"},{"title":"Get Webhook Deliveries","api":"GET /v1/webhooks/{webhook_id}/deliveries","href":"/api-reference/endpoint/get_webhook_deliveries"}]},{"group":"Device Auth","pages":[{"title":"Create Device Code","api":"POST /v1/auth/device/code","href":"/api-reference/endpoint/create_device_code"},{"title":"Poll Device Token","api":"POST /v1/auth/device/token","href":"/api-reference/endpoint/poll_device_token"}]},{"group":"Claude Code","pages":[{"title":"Get MCP JSON","api":"GET /v1/claude-code/mcp-json","href":"/api-reference/endpoint/claude_code_mcp_json"},{"title":"Get Org Skill","api":"GET /v1/claude-code/skill","href":"/api-reference/endpoint/claude_code_skill"},{"title":"Get Org Context","api":"GET /v1/claude-code/org-context","href":"/api-reference/endpoint/claude_code_org_context"}]}]}]},"basePath":"","title":"Update API Key - Danube","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js"]}