---
title: "Get the validity of a secret"
method: GET
path: "/v1/secrets/{secret_id}/validity"
tags: ["Secrets"]
---

# Get the validity of a secret

`GET /v1/secrets/{secret_id}/validity`

Retrieve the current validity status of a secret together with its validity
override. `validity_override` is `null` when no override is set.

**Prerequisites**:
  - A valid API key with the secrets:read scope.

## Path parameters

- `secret_id` integer, required

## Response `200`

The secret validity and validity override.

- object
  - `id` integer
  - `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.

## Other responses

- `401` — Invalid API key
- `403` — Forbidden
- `404` — Resource not found
- `503` — API under maintenance

---

[API](https://skmtc.net/gitguardian/apis/gitguardian-api.md) · [All operations](https://skmtc.net/gitguardian/apis/gitguardian-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitguardian/gitguardian-api/revisions/511b067cdcb1/schema)
