> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: "List secrets"
description: "List secrets visible to the authenticated user. Values are always masked; use the reveal endpoint to read a decrypted value."
method: "GET"
endpoint: "/api/v1/secrets"
order: 1
last_verified: 2026-07-27
---



`GET /api/v1/secrets`

List secrets visible to the authenticated user. Values are always masked; use the reveal endpoint to read a decrypted value.


  ### Query parameters

  - `project_id` _string_ — Filter to a single project.
  - `secret_type` _string_ — Filter by type: api_key, database_url, oauth_token, ssh_key, certificate, or other.
  - `environment_id` _string_ — Filter to a single environment.
  - `page` _integer_ — Page number. Defaults to 1.
  - `page_size` _integer_ — Results per page, 1-100. Defaults to 20.



  ### Request example


```bash
curl "https://api.agnt5.com/api/v1/secrets?project_id=b6f1a3e2-9c4d-4f7a-8e2b-1a2b3c4d5e6f" \
  -H "X-API-KEY: {api_key}"
```

```javascript
fetch('https://api.agnt5.com/api/v1/secrets?project_id=' + projectId, {
  headers: { 'X-API-KEY': apiKey }
})
```


  ```json {{ title: 'Response' }}
  {
    "success": true,
    "message": "Secrets retrieved successfully",
    "data": [
      {
        "id": "e4f5a6b7-...",
        "name": "OPENAI_API_KEY",
        "ref": "openai-api-key-x9k2",
        "masked_value": "sk-...wX0A",
        "secret_type": "api_key",
        "secret_role": "api_key",
        "workspace_id": "1a2b3c4d-...",
        "project_id": "b6f1a3e2-9c4d-4f7a-8e2b-1a2b3c4d5e6f",
        "environment_id": "c1d2e3f4-...",
        "sequence": 1,
        "created": 1732636800000,
        "updated": 1732636800000
      }
    ],
    "metadata": { "count": 1, "page": 1, "hasNext": false, "hasPrev": false }
  }
  ```



