Guides

Secrets

Declare, set, and read app secrets safely.

For agents: Declare required secret names, set values through the CLI/API, and read them only from server code with ctx.secrets.

CLI

printf '%s' "$CHECKOUT_SECRET_KEY" | userland apps secrets set "$APP_ID" CHECKOUT_SECRET_KEY
printf '%s' "$CHECKOUT_SECRET_KEY" | userland apps secrets set "$APP_ID" CHECKOUT_SECRET_KEY --account "$ACCOUNT_ID"

Setting or deleting secrets requires a platform account role with secret-write permission on the app’s owning account. Secret values are encrypted at rest, never returned by the API, and must not be embedded in static assets.