---
search:
  tags:
    - Secrets
    - PATCH
seo:
  description: >-
    Deletes first, then sets, in one write that bumps record_generation.…
    Reference for the PATCH /v1/apps/{project}/secrets endpoint in the
    Sproutboat Cloud API.
sidebar:
  label: Patch secrets
  badge: PATCH
title: Patch secrets
type: openapi-operation
---
Deletes first, then sets, in one write that bumps `record_generation`. Deleting a name that is not there is not an error here.
A name you set that the app's `bindings` do not declare as a `secret` is stored, but the Worker's `env` does not carry it: the answer lists it in `warnings`
(`code: secret-not-declared`, with the `fix`) and the status is still 200. Declare it in the deploy's `bindings` and the value goes live with that deploy. Names match `[A-Za-z_][A-Za-z0-9_]*`, at
most 128 characters; at most 128 secrets per app and 64 KiB of values in total. Values are strings.

`PATCH /v1/apps/{project}/secrets`
