Revoke a secret
SDK platic.secrets.revoke()
Stop using an exposed credential by sending its secretId, with no body. Platica stops sending its value to any destination and keeps the record in the list.
Warning
There is no operation to reactivate a revoked secret, and it cannot be rotated. The tools and webhooks that used it stop working until you bind another secret to them.
Example
curl -X POST https://api.platic.ai/v1/secrets/$SECRET_ID/revoke \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.secrets.revoke("secret_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
secretId | string | Id of the secret | ✓ |
Request body
It has no body.
Response
{
"status": "success",
"message": "Secret revoked successfully",
"data": {
"id": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c",
"name": "Acme Store · Orders API",
"kind": "bearer",
"status": "revoked",
"revision": 4,
"createdAt": "2026-10-28T12:05:00.000Z",
"updatedAt": "2026-11-06T08:02:11.000Z"
}
} Response fields
data has the secret with status: "revoked" and the fields in list secrets.
Errors
| Status | details.code | When it happens |
|---|---|---|
403 | FORBIDDEN | The person behind the token cannot manage secrets |
404 | SECRET_NOT_FOUND | The secret does not exist in this workspace or was already deleted |
409 | SECRET_CHANGED | Another change arrived at the same time. Repeat the call |
409 | SECRET_USE_REVOKED | The secret is being deleted |
Notes
- Before revoking, check
usedBywith get a secret. - To replace the credential without interrupting anything, use rotate a secret instead of revoking.
- A revoked secret still appears in list secrets. To remove it, delete it.
- Revoking the secret in Platica does not invalidate the credential with your provider: do that there too.