latestOpenAPI 3.0.3GitGuardian2026-08-201871515.0 MB

511b067cdcb1

Internal Secret Incidents
Secrets

Retrieve a secret value

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).
get/v1/secrets/{secret_id}

Path parameters

secret_idinteger required

The ID of the secret to retrieve

Headers

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

When set to true, sensitive values in the response are obfuscated (replaced with <GG>OBFUSCATED</GG>). Useful for sharing API responses without exposing sensitive data.

Response

Secret details

idinteger required

ID of the secret

matchesobject required

Matches of the secret

Example response

{
  "id": 37,
  "detector": {
    "name": "slack_bot_token",
    "display_name": "Slack Bot Token",
    "nature": "specific",
    "family": "token",
    "category": "messaging_system",
    "detector_group_name": "slackbot_token",
    "detector_group_display_name": "Slack Bot Token"
  },
  "matches": {
    "apikey": "sk-xxxxxxxxxxxxxxxx"
  }
}