latestOpenAPI 3.0.3GitGuardian2026-08-201871515.0 MB

511b067cdcb1

Secrets

Override the validity of a secret

Override the validity status of a secret with a customer-provided value.

While an override is set, GitGuardian stops running its periodic validity checks for the secret and the override value is reflected on the secret's validity.

Prerequisites:

  • A valid API key with the secrets:write scope.
post/v1/secrets/{secret_id}/validity

Path parameters

secret_idinteger required

The ID of the secret to update

Request body

validity'valid' | 'invalid' | 'failed_to_check' required

Validity status to push as an override. Only valid, invalid and failed_to_check are accepted as customer-provided results.

Example request

{
  "validity": "invalid"
}

Response

The validity override was set.

idinteger
validity'valid' | 'invalid' | 'failed_to_check' | 'no_checker' | 'unknown' nullable

Current validity of the secret (reflects the override while it is set).

validity_override'valid' | 'invalid' | 'failed_to_check' | 'no_checker' | 'unknown' nullable

The validity override currently set on the secret, or null if none.

Example response

{
  "id": 1,
  "validity": "invalid",
  "validity_override": "invalid"
}