Skip to main content
The API object for the pre-user-registration Actions trigger exposes methods for controlling access, managing user metadata, caching data, and signaling validation errors.

api.access

Modify the access of the user that is attempting to register, such as rejecting the signup attempt.
void
Deny the user from being able to register. The signup flow will immediately stop following the completion of this action and no further Actions will be executed.
Example
Parameters

api.user

Make changes to the metadata of the user that is registering.
void
Set application-specific metadata for the user that is registering.Note: This method should not be used in callbacks. Invoking this method won’t update the metadata immediately. You can call this several times throughout multiple actions of the same flow and the engine will aggregate the changes and update the metadata at once before the flow is completed.
Example
Parameters
void
Set general metadata for the user that is registering.Note: This method should not be used in callbacks. Invoking this method won’t update the metadata immediately. You can call this several times throughout multiple actions of the same flow and the engine will aggregate the changes and update the metadata at once before the flow is completed.
Example
Parameters

api.cache

Store and retrieve data that persists across executions.
void
Delete a cached record at the supplied key if it exists.
Example
Parameters
object | undefined
Retrieve a cached record at the supplied key. If found, access the value via record.value.
Example
Parameters
void
Store or update a string value in the cache at the specified key. Values are scoped to the Trigger and subject to the Actions Cache Limits. If no lifetime is specified, a default lifetime of 15 minutes will be used.Important: This cache is designed for short-lived, ephemeral data. Items may not be available in later transactions even if they are within their supplied lifetime.
Example
Parameters

api.validation

Signal validation errors to prevent the user from registering.
void
Deny the user from being able to register. The signup flow will immediately stop following the completion of this action and no further Actions will be executed.
Example
Parameters