- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
revokeApiKeysWorkflow - Medusa Core Workflows Reference
This documentation provides a reference to the revokeApiKeysWorkflow
. It belongs to the @medusajs/medusa/core-flows
package.
This workflow revokes one or more API keys. If the API key is a secret, it can't be used for authentication anymore. If it's publishable, it can't be used by client applications.
This workflow is used by the Revoke API Key API Route.
You can use this workflow within your customizations or your own custom workflows, allowing you to revoke API keys within your custom flows.
Source CodeExamples#
Steps#
Workflow Hook
Step conditioned by when
Input#
RevokeApiKeysWorkflowInput
RevokeApiKeysWorkflowInputThe data to revoke API keys.
RevokeApiKeysWorkflowInput
RevokeApiKeysWorkflowInputselector
FilterableApiKeyPropsThe filters to select the API keys to revoke.
selector
FilterableApiKeyPropsrevoke
RevokeApiKeyDTOThe data to revoke the API keys.
revoke
RevokeApiKeyDTOOutput#
RevokeApiKeysWorkflowOutput
RevokeApiKeysWorkflowOutputThe revoked API keys.
RevokeApiKeysWorkflowOutput
RevokeApiKeysWorkflowOutputid
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?