---
title: "Delete a secret"
method: DELETE
path: "/secrets/{secret_id}"
tags: ["secrets"]
---

# Delete a secret

`DELETE /secrets/{secret_id}`

Deletes an existing secret and its associated schedules.

Required scope: \`secrets:write\`

## Path parameters

- `secret_id` string, required

## Response `200`

Successfully deleted secret

- Secret
  - `id` string, required — Secret ID
  - `name` string, required — Name of the secret
  - `type` 'google_drive' | 'github' | 'notion' | 'x' | 'xai' | 'chartmetric', required — The type of the secret
  - `description` string — Description of the secret
  - `last_update_time` integer, required — Last updated time (Unix timestamp in seconds)
  - `creation_time` integer, required — Creation time (Unix timestamp in seconds)
  - `chartmetric_lifecycle_state` 'pending_create' | 'active' | 'pending_update' | 'pending_delete' — Persistent lifecycle state of a Chartmetric credential
  - `chartmetric_consent` ChartmetricConsentSummary, nullable
    - `plan_profile` string, required
    - `data_use_profile` string, required
    - `accepted_at` integer, required — Consent acceptance time (Unix timestamp in seconds)

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `409` — Conflict - The secret already exists or a concurrent revision conflict occurred
- `412` — Precondition Failed - The Chartmetric registration or lifecycle state does not allow this operation
- `500` — Internal Server Error
- `503` — Service Unavailable - The credential store is temporarily unavailable

## Changes

> 71 revisions in range; 18 not diffed.

- **2026-03-17** `b50a49abec5e` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/qlonolink/apis/qaip-apis/changes/secrets/:secret_id/delete.md)

---

[API](https://skmtc.dev/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.dev/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/61dc40676905/schema)
