> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Secrets

> This endpoint updates an existing secret

<Warning>
  **Verify deployment access.** This reference describes an API contract, not a provisioned
  public service. Check the dated [host report](/api-reference/hosts) and obtain the correct
  host, API version, and workspace credentials. For a current integration, start with the
  [API directory](/api-reference/introduction).
</Warning>

### Path parameters

<ParamField path="id" type="string" required>
  The ID of the secret to update.
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<Note>
  This endpoint returns an acknowledgement rather than the affected resource.
  `success` is `1` when the write was applied and `0` when it was not — read
  the resource back if you need its new state.
</Note>

### Errors

Succeeds with `201`. Failures return `400`, `401`, `403`, `422` or `429` with an error body, per the [platform status-code contract](/api-reference/errors#http-status-codes).

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/secrets/{id}' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --data-raw '{
      "id": ""
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": 1
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.