Skip to main content

Verify a Secret

Verifies whether a provided secret value is valid and active for a recipient. This is used during artifact retrieval to validate the secret authentication factor.
POST /v1/recipients/:recipientId/secrets/verify

Path Parameters

ParameterTypeDescription
recipientIdstringThe recipient ID

Request Body

ParameterTypeRequiredDescription
secretstringRequiredThe secret value to verify

Example Request

curl -X POST https://api.docyard.io/v1/recipients/rcp_01HQ3N.../secrets/verify \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{
    "secret": "dys_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
  }'

Response

{
  "valid": true,
  "secretId": "sec_01HQ5A..."
}
Invalid secret response:
{
  "valid": false,
  "secretId": null
}

Error Handling

StatusCondition
400secret is missing
401Missing or invalid API key
404Recipient not found
Verification checks against all ACTIVE secrets for the recipient. Secrets with status ROTATED or REVOKED will not pass verification. Expired secrets also fail verification.