Skip to content

Environments API

The environments 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: environments:read.

Lists the workspace’s environments, oldest first, and shows which one is the default.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
const environments = await reminix.environments.list();
console.log(environments);

Returns:

{
"items": [
{
"id": "env_6a88d290-171d-4fba-8710-21b0f94a5f0a",
"name": "staging",
"approvalPolicy": "agents",
"agentsAllowed": true,
"isDefault": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:00:00.000Z",
"updatedAt": "2026-08-20T09:00:00.000Z"
}
],
"nextCursor": null
}
Field Description
limit number, query Items per page, 1–100 (default 25).
cursor string, query Opaque token from a previous page's nextCursor.
More about this endpoint

To act in an environment, name it in the X-Environment header.

Scope: environments:write.

Adds an environment with no secret values yet.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
const environment = await reminix.environments.create({
name: "staging",
approvalPolicy: "agents",
});
console.log(environment);

Returns:

{
"id": "env_6a88d290-171d-4fba-8710-21b0f94a5f0a",
"name": "staging",
"approvalPolicy": "agents",
"agentsAllowed": true,
"isDefault": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:00:00.000Z",
"updatedAt": "2026-08-20T09:00:00.000Z"
}
Field Description
name string, required The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter.
approvalPolicy string Which runs here wait for a person's approval: none, agents for runs an agent starts, or always for every run. A run uses the stricter of this policy and its script's policy. The default is none.
agentsAllowed boolean Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here. The default is true.
More about this endpoint

To save its values, call secretValues.set with the new environment in the path. Workspace owners, admins and API keys can add an environment.

GET /v1/environments/{environment} Try it in the API playground (opens in a new tab)

Scope: environments:read.

Returns one environment and what uses it: its secret values, and the schedules and triggers that run in it.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
const environment = await reminix.environments.get("staging");
console.log(environment);

Returns:

{
"id": "env_6a88d290-171d-4fba-8710-21b0f94a5f0a",
"name": "staging",
"approvalPolicy": "agents",
"agentsAllowed": true,
"isDefault": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:00:00.000Z",
"updatedAt": "2026-08-20T09:00:00.000Z",
"usedBy": {
"secretValues": 1,
"schedules": 0,
"triggers": 0
}
}
Field Description
environment string, path, required The environment's ID.
More about this endpoint

Deleting the environment deletes its secret values. You can’t delete it while a schedule or trigger runs in it.

PATCH /v1/environments/{environment} Try it in the API playground (opens in a new tab)

Scope: environments:write.

Renames an environment, changes its rules, or makes it the workspace’s default with isDefault: true.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
const environment = await reminix.environments.update("staging", {
approvalPolicy: "agents",
});
console.log(environment);

Returns:

{
"id": "env_6a88d290-171d-4fba-8710-21b0f94a5f0a",
"name": "staging",
"approvalPolicy": "agents",
"agentsAllowed": true,
"isDefault": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:00:00.000Z",
"updatedAt": "2026-08-20T09:00:00.000Z"
}
Field Description
environment string, path, required The environment's ID.
name string The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter.
approvalPolicy string Which runs here wait for a person's approval: none, agents for runs an agent starts, or always for every run. A run uses the stricter of this policy and its script's policy.
agentsAllowed boolean Whether agents connected through MCP can run scripts in this environment. When it's false, Reminix also refuses schedules and triggers an agent adds here.
isDefault boolean Makes this the default environment. To change the default, make another environment the default.
More about this endpoint

Runs keep the environment name they ran under. Workspace owners, admins and API keys can change an environment.

DELETE /v1/environments/{environment} Try it in the API playground (opens in a new tab)

Scope: environments:write.

Deletes an environment and every secret value it holds.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
await reminix.environments.delete("staging");

Returns nothing (204).

Field Description
environment string, path, required The environment's ID.
More about this endpoint

Get the environment first to see how many values that is. You can’t delete the only environment, the default environment, or one that a schedule or trigger runs in. Workspace owners, admins and API keys can delete an environment.