A module representing actions on Auth0.
Actions are Auth0's extensibility model: Node functions that run at points in the login flow. They replace Rules, which Auth0 has made read-only and ends on 2026-11-18.
The work comes in three steps, and the third is the one people forget:
create/1an action, naming the triggers it supportsdeploy/1it, which makes a version liveupdate_bindings/2to bind it to a trigger
An action that is never bound never runs, no matter how many times it is deployed.
The /actions/modules endpoints, which share reusable code between actions, are
not wrapped here.
Summary
Functions
Gets all actions.
Gets the actions currently bound to a trigger, in execution order
Creates an action.
Deletes an action.
Deploys an action, creating a new version from the current draft.
Rolls an action back to an earlier version by redeploying it.
Gets the details of an action execution, including logs from each bound action
Gets a single action
Runs an action against a test payload without deploying it.
Gets the available triggers and their current versions.
Updates an action's code, dependencies, secrets or supported triggers.
Sets the actions bound to a trigger.
Gets a specific version of an action
Gets an action's deployed versions
Functions
Gets all actions.
Filters: triggerId, actionName, deployed, installed, plus page and
per_page.
iex> Auth0Client.Management.Action.all()
iex> Auth0Client.Management.Action.all(triggerId: "post-login", deployed: true)
Gets the actions currently bound to a trigger, in execution order
iex> Auth0Client.Management.Action.bindings("post-login")
Creates an action.
name and supported_triggers are required. supported_triggers is a list of
objects, not names — [%{id: "post-login", version: "v3"}]. Use triggers/0 to
see the available ids and their current versions.
iex> Auth0Client.Management.Action.create(%{
...> name: "enrich-profile",
...> supported_triggers: [%{id: "post-login", version: "v3"}],
...> code: "exports.onExecutePostLogin = async (event, api) => {};"
...> })
Deletes an action.
Auth0 refuses to delete an action that is still bound to a trigger; pass
force: true to delete it anyway.
iex> Auth0Client.Management.Action.delete("act_abc123")
iex> Auth0Client.Management.Action.delete("act_abc123", force: true)
Deploys an action, creating a new version from the current draft.
Auth0 accepts this asynchronously and answers 202, so a successful return means
the deployment was accepted rather than finished. Poll get/1 for the status.
iex> Auth0Client.Management.Action.deploy("act_abc123")
Rolls an action back to an earlier version by redeploying it.
Pass %{update_draft: true} to overwrite the draft with that version's code as
well. Like deploy/1, Auth0 answers 202.
iex> Auth0Client.Management.Action.deploy_version("act_abc123", "ver_1")
iex> Auth0Client.Management.Action.deploy_version("act_abc123", "ver_1", %{update_draft: true})
Gets the details of an action execution, including logs from each bound action
iex> Auth0Client.Management.Action.execution("exec_abc123")
Gets a single action
iex> Auth0Client.Management.Action.get("act_abc123")
Runs an action against a test payload without deploying it.
The payload is nested under payload for you.
iex> Auth0Client.Management.Action.test("act_abc123", %{user: %{email: "test@example.com"}})
Gets the available triggers and their current versions.
Use this to find the id and version for create/1's supported_triggers.
iex> Auth0Client.Management.Action.triggers()
Updates an action's code, dependencies, secrets or supported triggers.
Changes affect the draft; call deploy/1 to make them live.
iex> Auth0Client.Management.Action.update("act_abc123", %{code: "exports.onExecutePostLogin = async () => {};"})
Sets the actions bound to a trigger.
This replaces every binding on the trigger
It is not additive. Passing one binding unbinds every other action on that
trigger. Read bindings/2 first and pass the existing list back with your
change applied.
Order is significant — Auth0 executes bound actions in the order given.
Each binding is %{ref: %{type: "action_id", value: id}, display_name: name};
ref may also use type: "action_name".
iex> Auth0Client.Management.Action.update_bindings("post-login", [
...> %{ref: %{type: "action_id", value: "act_abc123"}, display_name: "Enrich profile"}
...> ])
Gets a specific version of an action
iex> Auth0Client.Management.Action.version("act_abc123", "ver_1")
Gets an action's deployed versions
iex> Auth0Client.Management.Action.versions("act_abc123")
iex> Auth0Client.Management.Action.versions("act_abc123", per_page: 10)