# List the org's Project secrets, without values.

`GET /o/{org}/secrets`

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |
| `project` | query | string | no | Only this Project's secrets. |

## Example request

```bash
curl "https://api.prix.dev/o/$RUSH_ORG/secrets" \
  -H "Authorization: Bearer $RUSH_TOKEN"
```

```typescript
const org = process.env.RUSH_ORG;

const res = await fetch(`https://api.prix.dev/o/${org}/secrets`, {
  headers: {
    Authorization: `Bearer ${process.env.RUSH_TOKEN}`,
  },
});

console.log(res.status, await res.json());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]

res = requests.get(
    f"https://api.prix.dev/o/{org}/secrets",
    headers={"Authorization": f"Bearer {os.environ['RUSH_TOKEN']}"},
)

print(res.status_code, res.json())
```

## Responses

### 200

Secrets, never a value.

- `data` (array of Secret, required)
  - `id` (string, required)
  - `name` (string, required)
  - `kind` (string, required, one of `env`, `header`, `login`)
  - `description` (string, required)
  - `project_id` (string, required)
  - `targets` (array of string, required): Hosts (header) or one origin (login); empty for env.
  - `header_name` (string | null, optional)
  - `header_format` (string | null, optional)
  - `has_totp` (boolean, required)
  - `created_by` (string | null, required): Null once the member who added it has deleted their account; the secret stays with the Project.
  - `created_at` (string, required)
  - `value_updated_at` (string, required)
  - `last_used_at` (string | null, optional)

### 401

No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.

## Example response (200)

```json
{
  "data": [
    {
      "id": "3f6c1e2a-8b4d-4c1e-9a7f-2d5b6e8c0a14",
      "name": "string",
      "kind": "env",
      "description": "string",
      "project_id": "3f6c1e2a-8b4d-4c1e-9a7f-2d5b6e8c0a14",
      "targets": [
        "string"
      ],
      "header_name": "string",
      "header_format": "string",
      "has_totp": true,
      "created_by": "3f6c1e2a-8b4d-4c1e-9a7f-2d5b6e8c0a14",
      "created_at": "2026-10-06T12:00:00Z",
      "value_updated_at": "2026-10-06T12:00:00Z",
      "last_used_at": "2026-10-06T12:00:00Z"
    }
  ]
}
```
