Skip to content

Approvals

Terminal window
npm install @reminix/sdk
import { createClient } from "@reminix/sdk";
const reminix = createClient(); // reads REMINIX_API_KEY

GET /v1/workspace/approval-actions

Actions a credential may not take itself but may ASK a person to approve: each one’s input (JSON Schema), who can approve it, and whether it creates a secret.

await reminix.workspace.approvalActions.list();

POST /v1/workspace/approval-requests

Files a request for an action you may not take yourself (see approval-actions) and notifies everyone who can approve it.

await reminix.workspace.approvalRequests.create({
action: "workspace.apiKey.create",
input: {
name: "acme-web",
scopes: [
"workspace:read",
],
},
reason: "<reason>",
});
FieldDescription
actionstring, requiredAn action id from approval-actions.
inputobject, requiredThe action's input, per its JSON Schema.
reasonstring, requiredWhy — the person reads it before deciding.
More about this endpoint

Show the person approveUrl and why you need it; then check the request until it is decided (it expires after 24 hours). A personal access token or an app a person connected may ask — not a workspace API key.

GET /v1/workspace/approval-requests/{requestId}

The request you filed: pending, denied, completed (the action ran — see result), approved (waiting for the CLI to redeem it), failed or expired.

await reminix.workspace.approvalRequests.get("<request-id>");
FieldDescription
requestIdstring, path, requiredThe request's id.

POST /v1/workspace/approval-requests/{requestId}/redeem

Runs an approved, secret-producing action ONCE and returns its secret — to the personal access token that asked, only.

await reminix.workspace.approvalRequests.redeem("<request-id>");
FieldDescription
requestIdstring, path, requiredThe request's id.
More about this endpoint

The CLI writes it to a file without printing it.