Skip to content

Secrets API

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

Lists the workspace’s secrets by name, with the environments that have a value and the hosts each value may go to.

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

Returns:

{
"items": [
{
"name": "ADMIN_KEY",
"allowEnvVar": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:05:00.000Z",
"updatedAt": "2026-08-20T09:06:00.000Z",
"values": [
{
"environment": "production",
"hosts": [
"api.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:05:00.000Z",
"lastUsedAt": "2026-10-02T14:05:01.000Z"
},
{
"environment": "staging",
"hosts": [
"api.staging.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:06:00.000Z",
"lastUsedAt": null
}
]
}
],
"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

The list never includes the values themselves.

Scope: secrets:read.

Returns one secret by its name, with the environments that have a value and the hosts each value may go to.

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

Returns:

{
"name": "ADMIN_KEY",
"allowEnvVar": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:05:00.000Z",
"updatedAt": "2026-08-20T09:06:00.000Z",
"values": [
{
"environment": "production",
"hosts": [
"api.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:05:00.000Z",
"lastUsedAt": "2026-10-02T14:05:01.000Z"
},
{
"environment": "staging",
"hosts": [
"api.staging.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:06:00.000Z",
"lastUsedAt": null
}
]
}
Field Description
name string, path, required The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.
More about this endpoint

It never includes the values themselves.

Scope: secrets:write.

Changes what applies to a secret in every environment.

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

Returns:

{
"name": "ADMIN_KEY",
"allowEnvVar": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:05:00.000Z",
"updatedAt": "2026-08-20T09:06:00.000Z",
"values": [
{
"environment": "production",
"hosts": [
"api.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:05:00.000Z",
"lastUsedAt": "2026-10-02T14:05:01.000Z"
},
{
"environment": "staging",
"hosts": [
"api.staging.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:06:00.000Z",
"lastUsedAt": null
}
]
}
Field Description
name string, path, required The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.
allowEnvVar boolean Whether scripts can read the secret as an environment variable. A new secret starts with false, so Reminix only attaches it to requests.
More about this endpoint

Its values are saved one environment at a time, with Save a secret’s value. Workspace owners, admins and API keys can change a secret.

Scope: secrets:write.

Deletes a secret and its value in every environment.

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

Returns nothing (204).

Field Description
name string, path, required The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.
More about this endpoint

Runs of scripts that use it fail until someone saves it again. Workspace owners, admins and API keys can delete a secret.

PUT /v1/secrets/{name}/values/{environment} Try it in the API playground (opens in a new tab)

Scope: secrets:write.

Saves a secret’s value in one environment.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
const result = await reminix.secretValues.set("ADMIN_KEY", "production", {
value: "ak_live_…",
hosts: [
"api.yourapp.com",
],
});
console.log(result);

Returns:

{
"name": "ADMIN_KEY",
"allowEnvVar": false,
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"createdAt": "2026-08-20T09:05:00.000Z",
"updatedAt": "2026-08-20T09:06:00.000Z",
"values": [
{
"environment": "production",
"hosts": [
"api.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:05:00.000Z",
"lastUsedAt": "2026-10-02T14:05:01.000Z"
},
{
"environment": "staging",
"hosts": [
"api.staging.yourapp.com"
],
"createdByUserId": "usr_1e21afeb-a999-46d6-8874-ae1c97c88418",
"updatedAt": "2026-08-20T09:06:00.000Z",
"lastUsedAt": null
}
]
}
Field Description
name string, path, required The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.
environment string, path, required The environment's name.
value string, required The secret itself, at most 16,384 bytes.
hosts array, required The only hosts Reminix sends this value to, such as api.stripe.com.
More about this endpoint

Saving creates the secret if it’s new, or replaces the value and its hosts to rotate it. Reminix encrypts the value, and no call ever returns it. Reminix sends the value only to the hosts in hosts. Workspace owners, admins and API keys can save a secret.

Remove a secret’s value from an environment

Section titled “Remove a secret’s value from an environment”
DELETE /v1/secrets/{name}/values/{environment} Try it in the API playground (opens in a new tab)

Scope: secrets:write.

Removes a secret’s value from one environment.

import { createClient } from "@reminix/sdk";
// Uses the REMINIX_API_KEY environment variable.
const reminix = createClient();
await reminix.secretValues.delete("ADMIN_KEY", "production");

Returns nothing (204).

Field Description
name string, path, required The secret's name, in UPPER_SNAKE_CASE. It starts with a letter and has at most 64 characters.
environment string, path, required The environment's name.
More about this endpoint

The secret and its values in other environments stay. Runs in that environment that use the secret fail until someone saves a value there again. Workspace owners, admins and API keys can remove a value.