Triggers API
The triggers endpoints, each in TypeScript, Python, the CLI and curl.
Set up
Section titled “Set up”npm install @reminix/sdkexport REMINIX_API_KEY="<your API key>"pip install reminixexport REMINIX_API_KEY="<your API key>"npm install -g @reminix/clireminix loginexport REMINIX_API_KEY="<your API key>"To pass the key yourself, use createClient({ apiKey: key }) in TypeScript or Reminix(api_key=key) in Python.
List a script’s triggers
Section titled “List a script’s triggers”GET /v1/scripts/{slug}/triggers Try it in the API playground (opens in a new tab) Scope: scripts:read.
Lists a script’s triggers, which are the events that start it.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const triggers = await reminix.triggers.list("alert-on-failure");console.log(triggers);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()triggers = reminix.triggers.list("alert-on-failure")print(triggers)reminix triggers list alert-on-failurecurl -X GET "https://api.reminix.com/v1/scripts/alert-on-failure/triggers" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns:
{ "items": [ { "id": "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", "name": "Nightly sync failed", "type": "event", "environment": "production", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }, "inputMode": null, "lockedInputs": null, "signature": null, "enabled": true, "disabledReason": null, "createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418", "lastRunAt": "2026-10-05T02:10:00.000Z" } ], "nextCursor": null}| Field | Description |
|---|---|
slug | The slug's ID. |
limit | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
Run a script when something happens
Section titled “Run a script when something happens”POST /v1/scripts/{slug}/triggers Try it in the API playground (opens in a new tab) Scope: scripts:write.
Creates a trigger that starts a run of the script, as you.
This takes a personal access token, not an API key. In the SDKs, pass it as token, with workspace.
import { createClient } from "@reminix/sdk";
const reminix = createClient({ token: process.env.REMINIX_TOKEN, workspace: "<workspace>" });const trigger = await reminix.triggers.create("alert-on-failure", { type: "event", name: "Nightly sync failed", event: "run.failed", filter: { "script.slug": "nightly-sync", }, inputs: { runId: "{{event.data.runId}}", error: "{{event.data.error}}", }, inputMode: "request", lockedInputs: [ "account", ], signature: "stripe", signingSecret: "whsec_…",});console.log(trigger);import os
from reminix import Reminix
reminix = Reminix(token=os.environ["REMINIX_TOKEN"], workspace="<workspace>")trigger = reminix.triggers.create( "alert-on-failure", type="event", name="Nightly sync failed", event="run.failed", filter={"script.slug": "nightly-sync"}, inputs={ "runId": "{{event.data.runId}}", "error": "{{event.data.error}}", }, input_mode="request", locked_inputs=["account"], signature="stripe", signing_secret="whsec_…",)print(trigger)reminix triggers create \ alert-on-failure \ --type event \ --name 'Nightly sync failed' \ --event run.failed \ --filter '{"script.slug":"nightly-sync"}' \ --inputs '{"runId":"{{event.data.runId}}","error":"{{event.data.error}}"}' \ --input-mode request \ --locked-input account \ --signature stripe \ --signing-secret 'whsec_…'curl -X POST "https://api.reminix.com/v1/scripts/alert-on-failure/triggers" \ -H "Authorization: Bearer $REMINIX_TOKEN" \ -H "X-Workspace: <workspace>" \ -H "Content-Type: application/json" \ -d '{"type":"event","name":"Nightly sync failed","event":"run.failed","filter":{"script.slug":"nightly-sync"},"inputs":{"runId":"{{event.data.runId}}","error":"{{event.data.error}}"},"inputMode":"request","lockedInputs":["account"],"signature":"stripe","signingSecret":"whsec_…"}'Returns:
{ "id": "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", "name": "Nightly sync failed", "type": "event", "environment": "production", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }, "inputMode": null, "lockedInputs": null, "signature": null, "enabled": true, "disabledReason": null, "createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418", "lastRunAt": "2026-10-05T02:10:00.000Z", "secret": "q8Vd3…", "url": "https://api.reminix.com/webhooks/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470/q8Vd3…"}| Field | Description |
|---|---|
slug | The slug's ID. |
type | A workspace event starts the runs. |
name | A name for the trigger, shown in the app. |
event | The event that starts a run. It can be any webhook event type, such as run.failed. |
filter | Event data fields, as dotted paths, that must equal these values. |
inputs | The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event. |
environment | The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment. |
inputMode | Where each run's inputs come from. fixed, the default, uses the saved inputs and ignores the body. call takes the body's fields that match the script's inputs. request gives the script the whole request as its request input. |
lockedInputs | Saved inputs that a call can't change. |
signature | Check each call's signature: stripe (Stripe-Signature) or github (X-Hub-Signature-256). The default is none. |
signingSecret | The provider's signing secret, with signature stripe or github. Reminix stores it encrypted and never returns it. |
More about this endpoint
With the type event, a run starts when an event of event happens in the workspace and its data matches filter. GET /v1/workspace/event-types lists the event types. The run starts within about a minute of the event, and a chain of triggered runs stops after 3. With the type webhook, a run starts when someone calls the trigger’s URL with its secret. The response carries the URL and the secret once. Only the script’s owner, or a workspace owner or admin, can create a webhook trigger, and its runs wait for approval where an agent’s would. For an event trigger, if every run of the script or of the environment needs approval, only workspace owners and admins can create it.
Get a trigger
Section titled “Get a trigger”GET /v1/scripts/{slug}/triggers/{triggerId} Try it in the API playground (opens in a new tab) Scope: scripts:read.
Returns one of a script’s triggers.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const trigger = await reminix.triggers.get("alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470");console.log(trigger);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()trigger = reminix.triggers.get( "alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470",)print(trigger)reminix triggers get \ alert-on-failure \ trg_6a2e4a00-bdcf-4035-85b7-544eab30f470curl -X GET "https://api.reminix.com/v1/scripts/alert-on-failure/triggers/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns:
{ "id": "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", "name": "Nightly sync failed", "type": "event", "environment": "production", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }, "inputMode": null, "lockedInputs": null, "signature": null, "enabled": true, "disabledReason": null, "createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418", "lastRunAt": "2026-10-05T02:10:00.000Z"}| Field | Description |
|---|---|
slug | The slug's ID. |
triggerId | The trigger's ID. |
More about this endpoint
A webhook trigger’s secret is never returned again after it is made or rotated.
Change a trigger
Section titled “Change a trigger”PATCH /v1/scripts/{slug}/triggers/{triggerId} Try it in the API playground (opens in a new tab) Scope: scripts:write.
Changes a trigger’s name, inputs or environment, or whether it’s enabled.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const trigger = await reminix.triggers.update("alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", { filter: { "script.slug": "nightly-sync", }, inputs: { runId: "{{event.data.runId}}", error: "{{event.data.error}}", },});console.log(trigger);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()trigger = reminix.triggers.update( "alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", filter={"script.slug": "nightly-sync"}, inputs={ "runId": "{{event.data.runId}}", "error": "{{event.data.error}}", },)print(trigger)reminix triggers update \ alert-on-failure \ trg_6a2e4a00-bdcf-4035-85b7-544eab30f470 \ --filter '{"script.slug":"nightly-sync"}' \ --inputs '{"runId":"{{event.data.runId}}","error":"{{event.data.error}}"}'curl -X PATCH "https://api.reminix.com/v1/scripts/alert-on-failure/triggers/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"filter":{"script.slug":"nightly-sync"},"inputs":{"runId":"{{event.data.runId}}","error":"{{event.data.error}}"}}'Returns:
{ "id": "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", "name": "Nightly sync failed", "type": "event", "environment": "production", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }, "inputMode": null, "lockedInputs": null, "signature": null, "enabled": true, "disabledReason": null, "createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418", "lastRunAt": "2026-10-05T02:10:00.000Z"}| Field | Description |
|---|---|
slug | The slug's ID. |
triggerId | The trigger's ID. |
name | A name for the trigger, shown in the app. |
filter | Event data fields, as dotted paths, that must equal these values. |
inputs | The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event. |
enabled | Whether the trigger starts runs. With false, it's disabled. |
environment | Another environment for the trigger's runs to use. |
inputMode | A webhook trigger's input mode. |
lockedInputs | A webhook trigger's saved inputs that a call can't change. |
signature | A webhook trigger's signature check. |
signingSecret | A new signing secret, with signature stripe or github. |
More about this endpoint
It also changes an event trigger’s filter, or a webhook trigger’s input mode, locked inputs and signature check. Changing the signature check needs its signing secret again. The creator of an event trigger, a webhook trigger’s script owner, a workspace owner or admin, or a workspace API key can change it.
Delete a trigger
Section titled “Delete a trigger”DELETE /v1/scripts/{slug}/triggers/{triggerId} Try it in the API playground (opens in a new tab) Scope: scripts:write.
Deletes a trigger.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();await reminix.triggers.delete("alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470");from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()reminix.triggers.delete( "alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470",)reminix triggers delete \ alert-on-failure \ trg_6a2e4a00-bdcf-4035-85b7-544eab30f470 \ --yescurl -X DELETE "https://api.reminix.com/v1/scripts/alert-on-failure/triggers/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns nothing (204).
| Field | Description |
|---|---|
slug | The slug's ID. |
triggerId | The trigger's ID. |
More about this endpoint
The creator of an event trigger, a webhook trigger’s script owner, a workspace owner or admin, or a workspace API key can delete it.
Rotate a webhook trigger’s secret
Section titled “Rotate a webhook trigger’s secret”POST /v1/scripts/{slug}/triggers/{triggerId}/rotate-secret Try it in the API playground (opens in a new tab) Scope: scripts:write.
Gives a webhook trigger a new secret and returns its new URL, this once.
import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.const reminix = createClient();const result = await reminix.triggers.rotateSecret("alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470");console.log(result);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()result = reminix.triggers.rotate_secret( "alert-on-failure", "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470",)print(result)reminix triggers rotate-secret \ alert-on-failure \ trg_6a2e4a00-bdcf-4035-85b7-544eab30f470 \ --yescurl -X POST "https://api.reminix.com/v1/scripts/alert-on-failure/triggers/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470/rotate-secret" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns:
{ "id": "trg_6a2e4a00-bdcf-4035-85b7-544eab30f470", "name": "Nightly sync failed", "type": "event", "environment": "production", "event": "run.failed", "filter": { "script.slug": "nightly-sync" }, "inputs": { "runId": "{{event.data.runId}}", "error": "{{event.data.error}}" }, "inputMode": null, "lockedInputs": null, "signature": null, "enabled": true, "disabledReason": null, "createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418", "lastRunAt": "2026-10-05T02:10:00.000Z", "secret": "q8Vd3…", "url": "https://api.reminix.com/webhooks/trg_6a2e4a00-bdcf-4035-85b7-544eab30f470/q8Vd3…"}| Field | Description |
|---|---|
slug | The slug's ID. |
triggerId | The trigger's ID. |
More about this endpoint
The old URL stops working at once. If Reminix disabled the trigger, such as after repeated refused calls, rotating enables it again. The script’s owner, a workspace owner or admin, or a workspace API key can rotate it.