List secrets

SDK platic.secrets.list()

Returns the workspace's secrets. Use it before creating one, to reuse one that already exists, and to find the id you will bind to a slot.

Example

await platic.secrets.list();

Query parameters

ParameterTypeDescriptionRequired
limitnumberSecrets per page, from 1 to 50. Defaults to 20—
pageTokenstringThe nextPageToken of the previous page—
workspacestringWorkspace id, when the credential has several—

Response

{
  "status": "success",
  "data": [
    {
      "id": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c",
      "name": "Acme Store · Orders API",
      "kind": "bearer",
      "status": "active",
      "revision": 1,
      "createdAt": "2026-10-28T12:05:00.000Z",
      "updatedAt": "2026-10-28T12:05:00.000Z"
    },
    {
      "id": "a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5f7092b4d6f8a0c2e4f6b8d0a1c3e5",
      "name": "Orders webhook · signature",
      "kind": "signing_key",
      "status": "active",
      "revision": 2,
      "createdAt": "2026-10-20T09:30:00.000Z",
      "updatedAt": "2026-10-27T16:12:40.000Z",
      "expiresAt": "2027-01-31T06:00:00.000Z"
    }
  ],
  "nextPageToken": null
}

Response fields

FieldTypeDescription
data[].idstringId of the secret. It is what you bind to a slot; it is not the value
data[].namestringName to recognize it
data[].kindstringapi_key, bearer, password, or signing_key
data[].statusstringactive, revoked, or deleting. See secret states
data[].revisionnumberGoes up with every change to the secret
data[].createdAt, updatedAtstring | nullDates in ISO 8601
data[].expiresAtstringWhen it stops working. Only appears if it has an expiration
nextPageTokenstring | nullSend it in pageToken to request the next page. null on the last one

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTlimit is out of range. details.issues has the list of problems
400INVALID_CURSORpageToken is not a nextPageToken of this list
403FORBIDDENThe person behind the token cannot view secrets

Notes

  • Deleted secrets do not appear. Revoked ones do, with status: "revoked".
  • Secrets that Platica creates when you send the secret or a header with a credential when you create a webhook also appear here.
  • To know where a secret is used, use get a secret.