Skip to main content
GET/vault/secrets

List Secrets

Returns a page of the secrets the caller owns or that are shared with them, in path order, without their values. prefix narrows the list to one branch of paths.

Follow nextCursor until it is null to read every page.

Parameters
projectId *query

The project's id.

prefixquery

Return only secrets whose path starts with this prefix, such as database/prod/.

cursorquery

The previous page's nextCursor.

Omit it for the first page.

limitquery

The most secrets to return on one page, from 1 to 200.

The default is 50.

Responses
HTTPK9O CodeDescription
200A page of secrets.
400`prefix` isn't a valid path prefix, or `cursor` isn't a cursor this list returned.
401The request carries no authenticated caller.
500An internal error. Retry later.
Response body (200)
nextCursorstring | null

Cursor for the next page; null when exhausted.

Example: "eyJuYW1lIjoiZGF0YWJhc2UvcHJvZC9wYXNzd29yZCJ9"
secrets *object[]

The page's secrets: the caller's own and the ones shared with them.

createdAt *string <date-time>

Creation timestamp.

Example: "2026-11-01T08:00:00.000Z"
createdBy *string

Creating principal.

Example: "usr_7Hq2LmN9pR4s"
id *string

sec_<base62>.

Example: "sec_4fK9xQ2mZ7aB"
kid *string

KEK reference.

Example: "vkey_7Rt2Wq9LxP4m"
metadata *object

Per-secret tags.

name *string

The secret's path.

Example: "database/prod/password"
ownerId *string

The secret's owner.

It never changes.

Example: "usr_7Hq2LmN9pR4s"
retiredAtstring <date-time> | null

Retirement timestamp (or null).

Example: "2026-11-15T09:30:00.123Z"
rotatedAtstring <date-time> | null

Last rotation timestamp (or null).

Example: "2026-11-15T09:30:00.123Z"
updatedAt *string <date-time>

Last-update timestamp.

Example: "2026-11-15T09:30:00.123Z"
updatedBy *string

Last-update principal.

Example: "usr_7Hq2LmN9pR4s"
version *integer <int64>

Monotone version.

Example: 3
visibility *any

Who else can list and reveal a secret: private (the owner only, the default) or shared with the listed principals or roles.

One of: object
kind *"private"
or: object
kind *"shared"
principalsstring[]

Subject ids granted read access (usr_/svc_/ext_<base62>).

rolesstring[]

Roles granted read access (e.g. ["PROJECT_ADMIN"] for a project-shared secret).

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.kibo.vault.secrets.list()

Showing example in TypeScript

Response example (200)
{
  "nextCursor": "eyJuYW1lIjoiZGF0YWJhc2UvcHJvZC9wYXNzd29yZCJ9",
  "secrets": [
    {
      "createdAt": "2026-11-01T08:00:00.000Z",
      "createdBy": "usr_7Hq2LmN9pR4s",
      "id": "sec_4fK9xQ2mZ7aB",
      "kid": "vkey_7Rt2Wq9LxP4m",
      "metadata": {
        "team": "payments"
      },
      "name": "database/prod/password",
      "ownerId": "usr_7Hq2LmN9pR4s",
      "retiredAt": "2026-11-15T09:30:00.123Z",
      "rotatedAt": "2026-11-15T09:30:00.123Z",
      "updatedAt": "2026-11-15T09:30:00.123Z",
      "updatedBy": "usr_7Hq2LmN9pR4s",
      "version": 3,
      "visibility": {
        "kind": "private"
      }
    }
  ]
}

More in Secrets