---
title: "POST /update-hashi-vault-target"
method: POST
path: "/update-hashi-vault-target"
tags: ["Targets"]
---

# POST /update-hashi-vault-target

`POST /update-hashi-vault-target`

## Request

- Base URL: `https://api.akeyless.io`
- URL: `https://api.akeyless.io/update-hashi-vault-target`
- Auth: none declared

## Request body

- UpdateHashiVaultTarget: updateHashiVaultTarget is a command that updates an existing target. [Deprecated: Use target-update-hashi-vault command]
  - `description` string: Description of the object
  - `hashi-url` string: HashiCorp Vault API URL, e.g. https://vault-mgr01:8200
  - `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 target secret value (if empty, the account default protectionKey key will be used)
  - `lock-on-read` string: Lock this secret after each successful value read
  - `lock-ttl` string: Lock TTL in minutes
  - `max-versions` string: Set the maximum number of versions, limited by the account settings defaults.
  - `name` string, required: Target name
  - `namespace` string[]: Comma-separated list of vault namespaces
  - `new-name` string: New target name
  - `rotate-on-unlock` string: Rotate this secret after it is unlocked
  - `token` string: Authentication token (see `/auth` and `/configure`)
  - `uid-token` string: The universal identity token, Required only for universal_identity authentication
  - `update-version` boolean: Deprecated
  - `vault-token` string: Vault access token with sufficient permissions

## Response `200`

updateHashiVaultTargetResponse wraps response body.

- UpdateHashiVaultTargetOutput
  - `target_id` integer

## Other responses

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

---

[API](https://skmtc.dev/akeyless/apis/infrastructure-connectivity.md) - [All operations](https://skmtc.dev/akeyless/apis/infrastructure-connectivity/llms.txt) - [OpenAPI document](https://skmtc.dev/akeyless/apis/infrastructure-connectivity/revisions/62dc62fea89d?raw)
