---
title: "POST /update-secret-val"
method: POST
path: "/update-secret-val"
tags: ["v2"]
---

# POST /update-secret-val

`POST /update-secret-val`

## Request body

- UpdateSecretVal
  - `accessibility` string — for personal password manager
  - `custom-field` object — For Password Management use, additional fields
  - `format` string — Secret format [text/json/key-value] (relevant only for type 'generic')
  - `inject-url` string[] — For Password Management use, reflect the website context
  - `json` boolean — Set output format to JSON
  - `keep-prev-version` string — Whether to keep previous version [true/false]. If not set, use default according to account settings
  - `key` string — The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
  - `last-version` integer — The last version number before the update
  - `multiline` boolean — The provided value is a multiline value (separated by '\n')
  - `name` string, required — Secret name
  - `new-version` boolean — Deprecated
  - `password` string — For Password Management use, additional fields
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication
  - `username` string — For Password Management use
  - `value` string, required — The secret value (relevant only for type 'generic')

## Response `200`

updateSecretValResponse wraps response body.

- UpdateSecretValOutput
  - `name` string

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.net/akeyless/apis/akeyless-api.md) · [All operations](https://skmtc.net/akeyless/apis/akeyless-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/akeyless/akeyless-api/versions/0ceb25634501/schema)
