---
title: "List Pending Secrets for Environment"
method: GET
path: "/agents/{namespace_slug}/{agent_name}/environments/{env_name}/secrets"
tags: ["Secrets"]
---

# List Pending Secrets for Environment

`GET /agents/{namespace_slug}/{agent_name}/environments/{env_name}/secrets`

List PENDING secrets for an environment (from EnvVar table).

    This is what will be used on next deploy.
    For deployed state, use GET /agents/{namespace_slug}/{agent_name}/environments/{env}/secrets/deployed

    Note: is_secret=True values are NEVER returned, only non-secrets when include_values=True.

## Path parameters

- `namespace_slug` string, required
- `agent_name` string, required
- `env_name` string, required

## Query parameters

- `include_values` boolean — Include values for non-secrets (is_secret=False only)

## Response `200`

Successful Response

- EnvVarListResponse — Response for listing environment variables.
  - `env_vars` EnvVarResponse[], required — List of environment variables
    - `created_at` string, date-time, nullable — Creation timestamp
    - `env_id` string, required — Environment ID
    - `id` string, required — Unique identifier
    - `is_secret` boolean, required — Whether value is write-only
    - `key` string, required — Variable key
    - `updated_at` string, date-time, nullable — Last update timestamp
    - `value` string, nullable — Decrypted value (only for non-secrets when requested)
  - `state` string — Indicates this is pending state (vs deployed). Pending = what will be used on next deploy. Deployed = what's currently running (from Version.secrets_snapshot).

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.dev/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/revisions/f24a474dc415/schema)
