---
title: "Update"
method: POST
path: "/v3/configs/config/secrets"
---

# Update

`POST /v3/configs/config/secrets`

Secrets

## Request body

- object
  - `project` string, required — Unique identifier for the project object.
  - `config` string, required — Name of the config object.
  - `secrets` object — Either `secrets` or `change_requests` is required (can't use both). Object of secrets you would like to save to the config. Try it with the sample secrets below.
    - `STRIPE` string
    - `ALGOLIA` string
    - `DATABASE` string
  - `change_requests` object[] — Either `secrets` or `change_requests` is required (can't use both). Object of secrets you would like to save to the config. Try it with the sample secrets below.
    - `name` string, required — The name of the secret.
    - `originalName` string, required — The original name of the secret. Use `null` (an actual `null`, not the string `null`) or omit this parameter for new secrets. If it differs from `name` then a rename is inferred.
    - `value` string, required — The value the secret should have. Use `null` (an actual `null`, not the string `null`) to leave the existing secret value unchanged.
    - `originalValue` string — The value you expect the secret to have before `name` is applied. If specified, the request will only be processed if the provided value matches what's found in Doppler.
    - `visibility` string — Must be set to either `masked`, `unmasked`, or `restricted`.
    - `originalVisibility` string — Must be set to either `masked`, `unmasked`, or `restricted`. The visibility you expect the secret to have before `visibility` is applied. If specified, the request will only be processed if the provided visibility matches what's found in Doppler.
    - `shouldPromote` boolean — Defaults to `false`. Can only be set to `true` if the config being updated is a branch config. If set to `true`, the provided secret will be set in both the branch config as well as the root config in that environment.
    - `shouldDelete` boolean — Defaults to `false`. If set to `true`, will delete the secret matching the `name` field.
    - `shouldConverge` boolean — Defaults to `false`. Can only be set to `true` if the config being updated is a branch config and there is a secret with the same name in the root config. In this case, the branch secret will inherit the value and visibility type from the root secret.
    - `valueType` object — The default valueType (string) will result in no validations being applied.
      - `type` 'string' | 'json' | 'json5' | 'boolean' | 'integer' | 'decimal' | 'email' | 'url' | 'uuidv4' | 'cuid2' | 'ulid' | 'datetime8601' | 'date8601' | 'yaml'
    - `originalValueType` object — The valueType you expect the secret to have before `valueType` is applied. If specified, the request will only be processed if the provided valueType matches what's found in Doppler.
      - `type` 'string' | 'json' | 'json5' | 'boolean' | 'integer' | 'decimal' | 'email' | 'url' | 'uuidv4' | 'cuid2' | 'ulid' | 'datetime8601' | 'date8601' | 'yaml'

## Response `200`

200

- object
  - `secrets` object
    - `STRIPE` object
      - `raw` string
      - `computed` string
      - `note` string
    - `ALGOLIA` object
      - `raw` string
      - `computed` string
      - `note` string
    - `DATABASE` object
      - `raw` string
      - `computed` string
      - `note` string

---

[API](https://skmtc.net/doppler/apis/core.md) · [All operations](https://skmtc.net/doppler/apis/core/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/doppler/core/versions/8f244bc5b038/schema)
