---
title: "POST /projects/{project_id}/secrets/{secret_id}/detect"
method: POST
path: "/projects/{project_id}/secrets/{secret_id}/detect"
tags: ["HTTP Checks"]
---

# POST /projects/{project_id}/secrets/{secret_id}/detect

`POST /projects/{project_id}/secrets/{secret_id}/detect`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/secrets/{secret_id}/detect`
- Auth: HTTP bearer

## Path parameters

- `project_id` integer, required
- `secret_id` integer, required

## Response `200`

Provider candidates and certificate detection; never the value

- SecretDetectionView
  - `candidates` Candidate[], required
    - `description` string, required
    - `evidence` 'value_pattern' | 'variable_name', required
    - `id` string, required
  - `detection_rule_count` integer, required
  - `local_artifacts` ExpiringArtifact[], required: Expiring items a local check would read. Labels and dates only, never values or token claims.
    - `expires_at` string, date-time, required
    - `kind` 'x509_certificate' | 'ssh_certificate' | 'openpgp_key' | 'jwt', required: The formats local checks read. Adding one needs no migration or new check kind.
    - `label` string, required: Names the item for people, for example "Certificate 'svc.example.test'" or "OpenPGP key 0x0123456789ABCDEF". Never secret material and never token claims.
    - `not_before` string, date-time, nullable
  - `secret_id` integer, required

## Other responses

- `400`: Secret is not in this project
- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal error

## Changes

- **2026-10-05** `4b228ebed583`: 1 info
  - endpoint added
- **2026-10-05** `63a80791dc58`: 1 breaking
  - api path removed without deprecation
- **2026-10-04** `9ad47322cbb8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/projects/:project_id/secrets/:secret_id/detect/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
