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
curl "https://api.platic.ai/v1/secrets?limit=20" \
-H "Authorization: Bearer $PLATIC_API_KEY"
await platic.secrets.list();
Query parameters
| Parameter | Type | Description | Required |
limit | number | Secrets per page, from 1 to 50. Defaults to 20 | — |
pageToken | string | The nextPageToken of the previous page | — |
workspace | string | Workspace 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
| Field | Type | Description |
data[].id | string | Id of the secret. It is what you bind to a slot; it is not the value |
data[].name | string | Name to recognize it |
data[].kind | string | api_key, bearer, password, or signing_key |
data[].status | string | active, revoked, or deleting. See secret states |
data[].revision | number | Goes up with every change to the secret |
data[].createdAt, updatedAt | string | null | Dates in ISO 8601 |
data[].expiresAt | string | When it stops working. Only appears if it has an expiration |
nextPageToken | string | null | Send it in pageToken to request the next page. null on the last one |
Errors
| Status | details.code | When it happens |
400 | INVALID_REQUEST | limit is out of range. details.issues has the list of problems |
400 | INVALID_CURSOR | pageToken is not a nextPageToken of this list |
403 | FORBIDDEN | The 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.