Environments API
The environments 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 environments
Section titled “List environments”GET /v1/environments Try it in the API playground (opens in a new tab) 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);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()environments = reminix.environments.list()print(environments)reminix environments listcurl -X GET "https://api.reminix.com/v1/environments" \ -H "Authorization: Bearer $REMINIX_API_KEY"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 | Items per page, 1–100 (default 25). |
cursor | Opaque token from a previous page's nextCursor. |
More about this endpoint
To act in an environment, name it in the X-Environment header.
Add an environment
Section titled “Add an environment”POST /v1/environments Try it in the API playground (opens in a new tab) 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);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()environment = reminix.environments.create(name="staging", approval_policy="agents")print(environment)reminix environments create --name staging --approval-policy agentscurl -X POST "https://api.reminix.com/v1/environments" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"name":"staging","approvalPolicy":"agents"}'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 | The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter. |
approvalPolicy | 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 | 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 an environment
Section titled “Get 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);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()environment = reminix.environments.get("staging")print(environment)reminix environments get stagingcurl -X GET "https://api.reminix.com/v1/environments/staging" \ -H "Authorization: Bearer $REMINIX_API_KEY"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 | 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.
Change an environment
Section titled “Change an environment”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);from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()environment = reminix.environments.update("staging", approval_policy="agents")print(environment)reminix environments update staging --approval-policy agentscurl -X PATCH "https://api.reminix.com/v1/environments/staging" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"approvalPolicy":"agents"}'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 | The environment's ID. |
name | The environment's name, unique in the workspace. It's up to 32 lowercase letters, digits and dashes, and starts with a letter. |
approvalPolicy | 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 | 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 | 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 an environment
Section titled “Delete 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");from reminix import Reminix
# Uses the REMINIX_API_KEY environment variable.reminix = Reminix()reminix.environments.delete("staging")reminix environments delete staging --yescurl -X DELETE "https://api.reminix.com/v1/environments/staging" \ -H "Authorization: Bearer $REMINIX_API_KEY"Returns nothing (204).
| Field | Description |
|---|---|
environment | 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.