Skip to content

Triggers API

The triggers endpoints, each in TypeScript, Python, the CLI and curl.

Terminal window
npm install @reminix/sdk
export REMINIX_API_KEY="<your API key>"

To pass the key yourself, use createClient({ apiKey: key }) in TypeScript or Reminix(api_key=key) in Python.

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);

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 string, path, required The slug's ID.
limit number, query Items per page, 1–100 (default 25).
cursor string, query Opaque token from a previous page's nextCursor.

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);

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 string, path, required The slug's ID.
type string, required A workspace event starts the runs.
name string, required A name for the trigger, shown in the app.
event string The event that starts a run. It can be any webhook event type, such as run.failed.
filter object Event data fields, as dotted paths, that must equal these values.
inputs object The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.
environment string The environment the runs use. The default is the request's X-Environment, or else the workspace's default environment.
inputMode string 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 array Saved inputs that a call can't change.
signature string Check each call's signature: stripe (Stripe-Signature) or github (X-Hub-Signature-256). The default is none.
signingSecret string 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 /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);

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 string, path, required The slug's ID.
triggerId string, path, required The trigger's ID.
More about this endpoint

A webhook trigger’s secret is never returned again after it is made or rotated.

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);

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 string, path, required The slug's ID.
triggerId string, path, required The trigger's ID.
name string A name for the trigger, shown in the app.
filter object Event data fields, as dotted paths, that must equal these values.
inputs object The script's inputs for each run, by name. A value like "{{event.data.<path>}}" takes its value from the event.
enabled boolean Whether the trigger starts runs. With false, it's disabled.
environment string Another environment for the trigger's runs to use.
inputMode string A webhook trigger's input mode.
lockedInputs array A webhook trigger's saved inputs that a call can't change.
signature string A webhook trigger's signature check.
signingSecret string 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 /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");

Returns nothing (204).

Field Description
slug string, path, required The slug's ID.
triggerId string, path, required 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.

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);

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 string, path, required The slug's ID.
triggerId string, path, required 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.