TypeScript SDK
The SDK does two things. run runs a script and gives you its result
in one call, however long it takes. And every API operation is a typed
method, so your editor knows each field and answer.
Install
Section titled “Install”npm install @reminix/sdkSet REMINIX_API_KEY to a key from API keys in the app.
Run a script
Section titled “Run a script”import { createClient } from "@reminix/sdk";
const reminix = createClient(); // reads REMINIX_API_KEY
const run = await reminix.run("monthly-report", { month: "2026-09" });console.log(run.output);run answers when the script has finished:
- A long run keeps going after the call.
runchecks on it until it ends. - A run that needs a person’s approval waits for them. Pass
onApprovalto show them where to approve it:reminix.run(slug, inputs, { onApproval: (url) => notify(url) }). - A run that fails, or whose approval is turned down, throws a
RunError. Itsrunhas the status and the error. - To get the run back at once instead, pass
{ wait: false }. - To make calling again safe, such as from a job that reruns, pass
{ idempotencyKey }. The same key and inputs answer with the first run instead of starting another.
Files in and out
Section titled “Files in and out”Give a file input as a Blob, a File, or { name, type, data }. The
SDK uploads it first and passes its id. Here the monthly report takes
an optional CSV file of manual adjustments, and writes the report as a
CSV file:
import { readFile } from "node:fs/promises";import { createClient } from "@reminix/sdk";
const reminix = createClient();
const run = await reminix.run("monthly-report", { month: "2026-09", adjustments: { name: "adjustments.csv", type: "text/csv", data: await readFile("adjustments.csv"), },});for (const file of run.files ?? []) { if (file.direction === "out") console.log(file.name, file.downloadUrl);}The files a run writes come back in run.files, each with a download
link. See Files.
Methods
Section titled “Methods”Each API operation is a method, named like its command in the
CLI: reminix runs list is
reminix.runs.list().
import { createClient } from "@reminix/sdk";
const reminix = createClient();
const { items } = await reminix.scripts.list();const recent = await reminix.runs.list({ script: "monthly-report", limit: 10,});await reminix.schedules.create("monthly-report", { name: "First of the month", cron: "0 8 1 * *", timezone: "Europe/London",});- Ids in the path are arguments, and everything else is one object.
- A method returns the response’s data. A failure throws an
ApiErrorwith the error’scode,message,statusandrequestId. - Every write sends an idempotency key, and a
failed attempt (a network error, a
5xx, a429) is retried with the same key, so it happens once. To make your own retry safe too, pass your key as the last argument:reminix.runs.create(slug, { inputs }, { idempotencyKey: id }).
Every method, linked to its fields and a full example under Endpoints:
Scripts
| Method | What it does |
|---|---|
reminix.scripts.archive() | Archive a script |
reminix.scripts.create() | Create a script |
reminix.scripts.get() | Get a script |
reminix.scripts.list() | List scripts |
reminix.scripts.restore() | Restore an archived script |
reminix.scripts.update() | Change a script |
Runs
| Method | What it does |
|---|---|
reminix.runs.cancel() | Cancel a run |
reminix.runs.create() | Run a script |
reminix.runs.get() | Get a run |
reminix.runs.list() | List runs |
reminix.runs.logs() | Get a run's log |
Versions
| Method | What it does |
|---|---|
reminix.scriptVersions.create() | Upload a version |
reminix.scriptVersions.list() | List a script's versions |
reminix.scriptVersions.publish() | Publish a version |
reminix.scriptVersions.run() | Test-run a version |
Schedules
| Method | What it does |
|---|---|
reminix.schedules.create() | Schedule a script |
reminix.schedules.delete() | Delete a schedule |
reminix.schedules.list() | List a script's schedules |
reminix.schedules.update() | Change a schedule |
Triggers
| Method | What it does |
|---|---|
reminix.triggers.create() | Run a script on an event |
reminix.triggers.delete() | Delete a trigger |
reminix.triggers.list() | List a script's triggers |
reminix.triggers.update() | Change a trigger |
Files
| Method | What it does |
|---|---|
reminix.files.download() | Download a file |
reminix.files.get() | Get a file |
reminix.files.list() | List files |
reminix.files.upload() | Upload a file |
Environments
| Method | What it does |
|---|---|
reminix.environments.create() | Add an environment |
reminix.environments.delete() | Delete an environment |
reminix.environments.get() | Get an environment |
reminix.environments.list() | List environments |
reminix.environments.update() | Change an environment |
Secrets
| Method | What it does |
|---|---|
reminix.secrets.delete() | Delete a secret |
reminix.secrets.list() | List secrets |
reminix.secrets.set() | Save a secret |
reminix.secrets.unset() | Remove a secret's value from an environment |
Script settings
| Method | What it does |
|---|---|
reminix.scriptSettings.get() | Get the workspace's script settings |
reminix.scriptSettings.update() | Change the workspace's script settings |
Workspace
| Method | What it does |
|---|---|
reminix.workspace.get() | Get the current workspace |
reminix.workspace.invitations.list() | List pending invitations |
reminix.workspace.members.list() | List workspace members |
reminix.workspace.teams.list() | List teams |
reminix.workspace.usage() | Get your plan's usage this period |
Webhooks
| Method | What it does |
|---|---|
reminix.workspace.eventTypes.list() | List event types |
reminix.workspace.webhookDeliveries.list() | List an endpoint's deliveries |
reminix.workspace.webhookDeliveries.redeliver() | Redeliver an event |
reminix.workspace.webhookEndpoints.create() | Add a webhook endpoint |
reminix.workspace.webhookEndpoints.delete() | Remove a webhook endpoint |
reminix.workspace.webhookEndpoints.enable() | Re-enable a webhook endpoint |
reminix.workspace.webhookEndpoints.get() | Get a webhook endpoint |
reminix.workspace.webhookEndpoints.list() | List webhook endpoints |
reminix.workspace.webhookEndpoints.test() | Send a test event |
Approvals
| Method | What it does |
|---|---|
reminix.workspace.approvalActions.list() | List the actions you can ask approval for |
reminix.workspace.approvalRequests.create() | Ask a person to approve an action |
reminix.workspace.approvalRequests.get() | Check an approval request |
reminix.workspace.approvalRequests.redeem() | Redeem an approved request |
Audit events
| Method | What it does |
|---|---|
reminix.workspace.auditEvents.list() | List workspace audit events |
Personal access tokens
| Method | What it does |
|---|---|
reminix.user.me() | Get the current user |
reminix.user.revokeToken() | Revoke the token making this request |
Your key
Section titled “Your key”createClient()reads your key from theREMINIX_API_KEYenvironment variable. Without it, it throws an error naming the variable. Where there’s noprocess.env, such as a browser or a Cloudflare Worker, pass the key:createClient({ token: env.REMINIX_API_KEY }).- With an API key, every call acts in the key’s workspace.
- With a personal access token, name the workspace:
createClient({ token, workspace: "acme" }).
Calling a path directly
Section titled “Calling a path directly”reminix.GET, reminix.POST and the other HTTP methods call any path,
with the same types. They return { data, error, response } instead of
throwing, and unwrap turns that into the data or an ApiError.