> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobileboost.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Store and reference sensitive values in no-code test prompts

Environment variables let you store sensitive values, such as API tokens, and reuse them in test prompts without exposing the raw value in each test.

Use environment variables for values that differ by account, environment, or test setup. For example, you can store an API token once and reference it from a network request or cURL pre-request.

## Add an environment variable

<Steps>
  <Step title="Open Env Variables">
    In QA Studio, go to **Account > Settings**, then open the **Env Variables** section.
  </Step>

  <Step title="Add a variable">
    Click **Add Env Variable**.
  </Step>

  <Step title="Enter the key and value">
    Enter a **Key** and **Value**.

    For example, use `api-token` as the key and paste the matching token as the value.
  </Step>

  <Step title="Hide sensitive values">
    For confidential values, enable **Secure Entry: Omit Value from Interfaces and Logs**.

    This keeps the value hidden from interfaces and logs.
  </Step>
</Steps>

## Use an environment variable in test prompts

Reference environment variables with `{{env.<key>}}`.

For example, if your key is `api-token`, reference it like this:

```text theme={null}
{{env.api-token}}
```

You do not need to wrap the variable in double quotes when you use it in a prompt or command.

```text theme={null}
Type {{env.username}} into the username field
```

## Use an environment variable in a cURL command

You can reference stored environment variables in cURL pre-requests. This is useful when a setup request needs a secret token.

For example, you can run a `DELETE` request before a test starts to clean a user's order history:

```bash theme={null}
curl -X DELETE "https://api.example.com/users/123/order-history" \
     -H "Authorization: Bearer {{env.apitoken}}"
```

For more details about pre-requests, see [Network requests](/qa-studio/network-requests).
