---
title: "Delete a Secret"
method: POST
path: "/v1/apps/secrets/delete"
---

# Delete a Secret

`POST /v1/apps/secrets/delete`

Deletes a secret from the secret store by name and scope.

## Response `200`

Successful response.

- AppsSecret — Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects)
  - `created` integer, required — Time at which the object was created. Measured in seconds since the Unix epoch.
  - `deleted` boolean — If true, indicates that this secret has been deleted
  - `expires_at` integer, nullable — The Unix timestamp for the expiry time of the secret, after which the secret deletes.
  - `id` string, required — Unique identifier for the object.
  - `livemode` boolean, required — Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
  - `name` string, required — A name for the secret that's unique within the scope.
  - `object` 'apps.secret', required — String representing the object's type. Objects of the same type share the same value.
  - `payload` string, nullable — The plaintext secret value to be stored.
  - `scope` SecretServiceResourceScope, required
    - `type` 'account' | 'user', required — The secret scope type.
    - `user` string — The user ID, if type is set to "user"

## Other responses

- `default` — Error response.

## Changes

> 10 revisions in range; 2 not diffed.

- **2025-02-14** `1199cc3c5574` — 2 breaking, 9 info
  - the response property `error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/price_type` became optional for the status `default`
  - the response property `error/payment_intent/invoice/anyOf[subschema #2: Invoice]/total_pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/price_type` became optional for the status `default`
  - added the optional property `error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/applicability_config/scope/prices` to the response with the `default` status
  - added the optional property `error/payment_intent/invoice/anyOf[subschema #2: Invoice]/lines/data/items/pretax_credit_amounts/items/credit_balance_transaction/anyOf[subschema #2: CreditBalanceTransaction]/credit_grant/anyOf[subschema #2: CreditGrant]/priority` to the response with the `default` status
  - …7 more
- …earlier changes not shown

[Full history](https://skmtc.dev/stripe/apis/spec3/changes/v1/apps/secrets/delete/post.md)

---

[API](https://skmtc.dev/stripe/apis/spec3.md) · [All operations](https://skmtc.dev/stripe/apis/spec3/llms.txt) · [OpenAPI document](https://skmtc.dev/stripe/apis/spec3/revisions/1199cc3c5574?raw)
