Skip to main content

Revoke a Secret

Permanently revokes a secret. The secret can no longer be used for verification and cannot be rotated.
POST /v1/recipients/:recipientId/secrets/:secretId/revoke

Path Parameters

ParameterTypeDescription
recipientIdstringThe recipient ID
secretIdstringThe secret ID to revoke

Example Request

curl -X POST https://api.docyard.io/v1/recipients/rcp_01HQ3N.../secrets/sec_01HQ5B.../revoke \
  -H "Authorization: Bearer dk_live_a1b2c3d4..."

Response

{
  "success": true
}

Error Handling

StatusCondition
401Missing or invalid API key
404Recipient or secret not found
409Secret has already been revoked
Revocation is permanent. Once revoked, the secret cannot be restored or rotated. If the recipient needs a new secret, use Generate a Secret to create one.