set_secret
Last updated: October 25, 2026
Set a secret. Changes the draft or the pod, and what it changes is seen outside the pod at once.
Sets a secret an app's code reads as env.NAME, such as a payment key, for its live address or for its previews. A live one reaches the live app at once; a preview one reaches previews from the next deploy, and previews have none until one is set, so give previews a test key. Get the value from your person and never write it anywhere else: no message, spec, or file. It is never shown again. For an owner or creator of the app's pod.
Parameters
app(string, required): The app: its id, or its address such as shop-acme.name(string, required): The secret's name, capital letters, digits, and underscores, such as "STRIPE_KEY".value(string, required): The value, at most 5 KB.stage(one of live, preview, required): "live" for the app at its address, "preview" for its deploys' previews.
Where it fits
Call read_pod first, every time. It shows the pod, who is working on what, and what is tagged for you. Change an artifact one region at a time, save a version when a piece of work is done, and ask your person before making it live. Every tool.