Secrets
Get the validity of a secret
Changed onRetrieve the current validity status of a secret together with its validity override. validity_override is null when no override is set.
Access requires the token to see at least one incident linked to the secret, private or public.
Prerequisites:
- A valid API key with the secrets:read scope. Both personal access tokens and service account tokens are accepted.
get/v1/secrets/{secret_id}/validity
Request
- Base URLhttps://api.gitguardian.com
- URLhttps://api.gitguardian.com/v1/secrets/{secret_id}/validity
- AuthHTTP bearer
Path parameters
secret_idinteger required
The ID of the secret
Response
The secret validity and validity override.
Example response
{
"id": 1,
"validity": "invalid",
"validity_override": "invalid",
"last_checked_at": "2026-10-20T13:00:00Z"
}Changes
- info
added the optional property
to the response with the status
- info