Secrets
Set up
Section titled “Set up”npm install @reminix/sdkimport { createClient } from "@reminix/sdk";
const reminix = createClient(); // reads REMINIX_API_KEYpip install reminixfrom reminix import Reminix
reminix = Reminix() # reads REMINIX_API_KEYnpm install -g @reminix/clireminix loginexport REMINIX_API_KEY="<your API key>"List secrets
Section titled “List secrets”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();reminix.secrets.list()reminix secrets listcurl -X GET "https://api.reminix.com/v1/secrets" \ -H "Authorization: Bearer $REMINIX_API_KEY"Save a secret
Section titled “Save a secret”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", ],});reminix.secrets.set( "ADMIN_KEY", value="<value>", hosts=["api.yourapp.com"],)reminix secrets set \ ADMIN_KEY \ --value '<value>' \ --hosts '["api.yourapp.com"]'curl -X PUT "https://api.reminix.com/v1/secrets/ADMIN_KEY" \ -H "Authorization: Bearer $REMINIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"value":"<value>","hosts":["api.yourapp.com"]}'| Field | Description |
|---|---|
name | |
value | The secret itself. |
hosts | |
allowEnv | Let 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 a secret
Section titled “Delete a secret”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");reminix.secrets.delete("ADMIN_KEY")reminix secrets delete ADMIN_KEY --yescurl -X DELETE "https://api.reminix.com/v1/secrets/ADMIN_KEY" \ -H "Authorization: Bearer $REMINIX_API_KEY"| Field | Description |
|---|---|
name |
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");reminix.secrets.unset("ADMIN_KEY", "staging")reminix secrets unset ADMIN_KEY staging --yescurl -X DELETE "https://api.reminix.com/v1/secrets/ADMIN_KEY/values/staging" \ -H "Authorization: Bearer $REMINIX_API_KEY"| Field | Description |
|---|---|
name | |
environment |
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.