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

# List Variables

> Get environment variables.

<ParamField header="Authorization" type="string" placeholder="API Key" required>
  The API key for your account. You can find this in your [account settings](https://squarecloud.app/en/account/security).
</ParamField>

Returns the application's current environment variables as a flat key-value object, read directly from its `.env` file on the cluster. If no variables have been set yet, the response is a success with an empty object rather than an error.

Static applications don't support environment variables and return an error instead. On workspace-shared applications, the caller needs the Administrator role or ownership.

To add or update variables, use [Add/Edit Variables](/en/api-reference/endpoint/apps/envs/add_n_edit); to replace the whole set, see [Overwrite Variables](/en/api-reference/endpoint/apps/envs/overwrite).

### Parameters

<ParamField path="app_id" type="string" placeholder="App ID" required>
  The application ID.
</ParamField>

### Response

<ResponseField name="status" type="string">
  Indicates whether the call was successful.. `success` if successful, `error` if not.
</ResponseField>

<ResponseField name="response" type="object">
  The key and value of all environment variables you defined.
</ResponseField>

<ResponseExample>
  ```json theme={null}
  {
    "status": "success",
    "response": {
      "TEST": "myTest"
    }
  }
  ```
</ResponseExample>

### Common errors

| Code                           | HTTP | Meaning                                                                     |
| ------------------------------ | ---- | --------------------------------------------------------------------------- |
| `STATIC_APP_ENV_NOT_SUPPORTED` | 400  | The application is static; static apps don't support environment variables. |
| `READ_FAILED`                  | 400  | The `.env` file could not be read from the cluster.                         |
