- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
updateApiKeysWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the updateApiKeysWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow updates one or more secret or publishable API keys. It's used by the Update API Key Admin API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to update API keys within your custom flows.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
UpdateApiKeysWorkflowInput
UpdateApiKeysWorkflowInputThe data to update API keys.
UpdateApiKeysWorkflowInput
UpdateApiKeysWorkflowInputselector
FilterableApiKeyPropsThe filters to select the API keys to update.
selector
FilterableApiKeyPropsupdate
UpdateApiKeyDTOThe data to update the API keys.
update
UpdateApiKeyDTOOutput#
UpdateApiKeysWorkflowOutput
UpdateApiKeysWorkflowOutputThe updated API keys.
UpdateApiKeysWorkflowOutput
UpdateApiKeysWorkflowOutputid
stringThe ID of the API key.
id
stringtoken
stringThe token of the API key.
token
stringredacted
stringThe redacted form of the API key's token. This is useful
when showing portion of the token. For example sk_...123
.
redacted
stringsk_...123
.title
stringThe title of the API key.
title
stringtype
ApiKeyTypeThe type of the API key.
type
ApiKeyTypelast_used_at
null | DateThe date the API key was last used.
last_used_at
null | Datecreated_by
stringWho created the API key.
created_by
stringcreated_at
DateThe date the API key was created.
created_at
Dateupdated_at
DateThe date the API key was updated.
updated_at
Datedeleted_at
null | DateThe date the API key was deleted.
deleted_at
null | Daterevoked_by
null | stringWho revoked the API key. For example,
the ID of the user that revoked it.
revoked_by
null | stringrevoked_at
null | DateThe date the API key was revoked.
revoked_at
null | DateWas this page helpful?