# List secret sets (/en/api-reference/api-ref/conversational-ai/platform/list-secret-sets)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI API.
> Documentation version: Preview.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-api-v2.txt).


Retrieves the secret sets in your project and their key names.

- OpenAPI: /openapi/conversational-ai/rest-api-platform.en.yaml
- Operation ID: list-secret-sets
- Method: GET
- Path: /v1/projects/{appid}/secrets
- Endpoint: https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/secrets

## Servers

- https://preview.ai.agora.io/conversational-ai

## Authorization

This endpoint requires authentication.

- `tokenAuth`
- `basicAuth`

## Parameters

- `appid` (path, required, string) - The App ID of your project.
- `limit` (query, optional, integer) - The maximum number of secret sets to return on each page.
  - Default: `50`
  - Range: `[1, 200]`
- `cursor` (query, optional, string) - The `next_cursor` value from the previous page of results. Omit it to get the first page. The cursor is opaque, so pass it back unchanged.
- `order` (query, optional, string) - The sort order of the results:

- `create_ts.desc`: Newest first.
- `create_ts.asc`: Oldest first.
  - Allowed: `create_ts.desc` | `create_ts.asc`
  - Default: `create_ts.desc`

## Request body

No request body.

## Responses

### 200

The request was successful. The response body contains a page of secret sets. Secret values are never returned.

- `has_more` (boolean) - Whether more results are available after this page.
- `next_cursor` (string | null | null) - The cursor for the next page. Pass it in the `cursor` query parameter of your next request. `null` on the last page.
- `data` (object)
  - `data.count` (integer) - The number of secret sets on this page.
  - `data.list` (array) - The secret sets on this page.
    - `data.list.items` (object)
      - `data.list.items.name` (string, required) - The name of the secret set.
      - `data.list.items.keys` (array, required) - The names of the keys in the set. Values are never returned.
        - `data.list.items.keys.items` (string)
      - `data.list.items.create_ts` (integer, required) - The time the set was created, as a Unix timestamp in seconds.
      - `data.list.items.update_ts` (integer, required) - The time the set was last updated, as a Unix timestamp in seconds.
### 401

Authentication is missing or invalid. The reason is `InvalidPermission`.

- `detail` (string, required) - A human-readable description of the error. It names the field or resource involved, when there is one. Don't parse it; branch on `reason` instead.
- `reason` (string, required) - A machine-readable error reason, such as `InvalidFieldValue` or `ResourceNotFound`. For all reasons, see [Status codes](/en/api-reference/api-ref/conversational-ai/platform/status-codes).
### default

The request failed. The response body contains the `reason` and `detail` of the failure. For possible reasons, see [Status codes](/en/api-reference/api-ref/conversational-ai/platform/status-codes).

- `detail` (string, required) - A human-readable description of the error. It names the field or resource involved, when there is one. Don't parse it; branch on `reason` instead.
- `reason` (string, required) - A machine-readable error reason, such as `InvalidFieldValue` or `ResourceNotFound`. For all reasons, see [Status codes](/en/api-reference/api-ref/conversational-ai/platform/status-codes).

## Response examples

### 200

```json
{
  "data": {
    "count": 1,
    "list": [
      {
        "name": "support_prod",
        "keys": [
          "llm"
        ],
        "create_ts": 1789898400,
        "update_ts": 1790000000
      }
    ]
  },
  "has_more": false,
  "next_cursor": null
}
```
