Rename an API key or change its tool set
The secret itself never changes. Pass name, toolSetId, or both. toolSetId moves the key to that tool set (null moves it to Main); the next request with the same key uses the new set. Only secret keys take a tool set, and binding one narrows the key to the execution audience (moving back to Main keeps it narrowed). A rename alone appends a RENAMED credential audit event; a tool set change appends UPDATED with toolSetId and previousToolSetId. Requires a workspace owner or admin with MFA step-up completed in the last ten minutes.
Request
- Base URLhttps://api.paywithlocus.com/api
- URLhttps://api.paywithlocus.com/api/credits/tenants/me/keys/{keyId}
- AuthHTTP bearer
Path parameters
Key record id from GET /credits/tenants/me/keys.
Headers
Short-lived raw MFA/passkey step-up token bound to the authenticated Cognito subject. Send it alongside the dashboard Bearer token for workspace-administrator mutations when the base session does not itself prove MFA within the last ten minutes. Never send it with a tenant secret key.
Request body
Response
Updated key metadata under keyMetadata.
Changes
No recorded changes to this operation across all 1 revision of this API.