---
title: "listSecrets"
---

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

# listSecrets

Path: agenthold API › secrets

`GET /workspaces/{workspaceId}/secrets`

URL: `/api/v1/workspaces/{workspaceId}/secrets`

Secrets the caller can attach (their own; all of them for workspace admins). Values are never returned.

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `workspaceId` (`listSecrets.path.workspaceId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/workspaces/<workspaceId>/secrets' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/workspaces/<workspaceId>/secrets';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/workspaces/<workspaceId>/secrets"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Secrets.

#### Example

```json
[
  {
    "id": "string",
    "workspaceId": "string",
    "name": "string",
    "rule": {
      "hosts": [
        "string"
      ],
      "header": "string",
      "template": "string"
    },
    "placeholder": "string",
    "owner": {
      "id": "string",
      "email": "string",
      "name": "string",
      "avatarUrl": "string"
    },
    "canManage": true,
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
]
```

- `id` (`listSecrets.response.200.id`; string, required)
- `workspaceId` (`listSecrets.response.200.workspaceId`; string, required)
- `name` (`listSecrets.response.200.name`; string, required)
- `rule` (`listSecrets.response.200.rule`; object, required)
  - `hosts` (`listSecrets.response.200.rule.hosts`; array of string, required) — Exact host names or "*.example.com".
  - `header` (`listSecrets.response.200.rule.header`; string, required)
  - `template` (`listSecrets.response.200.rule.template`; string, required) — Header value; {{.Value}} is the secret. Function: base64.
- `placeholder` (`listSecrets.response.200.placeholder`; string, required) — What sandboxes see instead of the value.
- `owner` (`listSecrets.response.200.owner`; object, required)
  - `id` (`listSecrets.response.200.owner.id`; string, required)
  - `email` (`listSecrets.response.200.owner.email`; string, required)
  - `name` (`listSecrets.response.200.owner.name`; string, required)
  - `avatarUrl` (`listSecrets.response.200.owner.avatarUrl`; string, required)
- `canManage` (`listSecrets.response.200.canManage`; boolean, required)
- `createdAt` (`listSecrets.response.200.createdAt`; string, required)
  - format: `date-time`
- `updatedAt` (`listSecrets.response.200.updatedAt`; string, required)
  - format: `date-time`

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`listSecrets.response.404.error`; string, required)


Source: https://agenthold.dev/api/list-secrets/index.md
