Skip to content

Secrets

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

GET /v1/secrets

The workspace’s secrets by name, with the environments that have a value and the hosts each value may be sent to — never the values.

await reminix.secrets.list();

PUT /v1/secrets/{name}

Saves the secret’s value in the request’s environment: creates it, or replaces the value and its hosts (rotation).

await reminix.secrets.set("ADMIN_KEY", {
value: "<value>",
hosts: [
"api.yourapp.com",
],
});
FieldDescription
namestring, path, required
valuestring, requiredThe secret itself.
hostsarray, required
allowEnvbooleanLet scripts read it as a plain value. Default false — attached to requests only.
More about this endpoint

The value is encrypted and never returned by any call. hosts are the ONLY hosts that value is ever sent to — a script cannot send it anywhere else. Workspace owners and admins, or a workspace API key.

DELETE /v1/secrets/{name}

Deletes it and its value in every environment; runs of scripts that use it fail until it is saved again.

await reminix.secrets.delete("ADMIN_KEY");
FieldDescription
namestring, path, required
More about this endpoint

Workspace owners and admins, or a workspace API key.

Remove a secret’s value from an environment

Section titled “Remove a secret’s value from an environment”

DELETE /v1/secrets/{name}/values/{environment}

Removes the value in that environment only; the secret and its other values stay.

await reminix.secrets.unset("ADMIN_KEY", "staging");
FieldDescription
namestring, path, required
environmentstring, path, required
More about this endpoint

Runs there that use it fail until a value is saved again. Workspace owners and admins, or a workspace API key.