---
title: "List secrets"
method: GET
path: "/v2/aihub/secrets"
tags: ["secrets"]
---

# List secrets

`GET /v2/aihub/secrets`

List secrets available to the organization, available to a given workspace, or with a given alias.

<Note>Only organization admins can list all secrets in the organization. Non-admins must specify a workspace.</Note>

## Query parameters

- `workspace` string
- `alias` string

## Headers

- `Authorization` string, required
- `IB-Context` string

## Response `200`

A list of secrets.

- SecretsListSecretsResponse200
  - `secrets` Secret[]
    - `alias` string — Name of the secret.
    - `description` string — Description of the secret.
    - `allowed_workspaces_type` 'ALL' | 'SOME' | 'NONE' — Which workspaces in this organization are allowed to use this secret in custom functions.
    - `allowed_workspaces` string[] — Which workspaces are allowed to use this secret, if only some are allowed.
    - `org` string — The organization name in which this secret was created.
    - `created_at` number, double — When the secret was created in Unix time milliseconds.
    - `created_by` string — The user ID of the user who created the secret.
    - `updated_at` number, double — When the secret was last updated in Unix time milliseconds.
    - `last_updated_by` string — The user ID of the user who last edited the secret.

---

[API](https://skmtc.net/instabase/apis/api-reference.md) · [All operations](https://skmtc.net/instabase/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instabase/api-reference/revisions/3a4f46d48141/schema)
