---
title: "Retrieve a secret value"
method: GET
path: "/v1/secrets/{secret_id}"
tags: ["Internal Secret Incidents", "Secrets"]
---

# Retrieve a secret value

`GET /v1/secrets/{secret_id}`

Retrieve the information, including its clear text value, of a secret by its ID.

**Prerequisites**:
  - This endpoint must be enabled in the workspace settings under Security by a workspace admin.
  - A valid API key with the secrets:read scope. This scope is available only for Personal Access Tokens (PATs).

## Path parameters

- `secret_id` integer, required

## Headers

- `X-Privacy-Mode` 'true' | 'false'

## Response `200`

Secret details

- object — Detailed information about a secret
  - `id` integer, required — ID of the secret
  - `detector` object, required
    - `name` string, required
    - `display_name` string, required
    - `nature` string, required
    - `family` string
    - `category` string
    - `detector_group_name` string
    - `detector_group_display_name` string
  - `matches` object, required — Matches of the secret

## Other responses

- `400` — Invalid data
- `401` — Invalid API key
- `404` — Secret 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)
