Skip to main content
PATCH
/
api
/
v2
/
vaults
/
{vault_id}
Update a vault
curl --request PATCH \
  --url https://agp.eu.hcompany.ai/api/v2/vaults/{vault_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "provider_config": {}
}
'
Partially updates a vault config. Only the fields you send are changed. To replace the stored service account token, use Rotate the token instead. Returns the updated vault object.

Path parameters

vault_id
string
required
The vault config’s id (UUID).

Request body

name
string
New label for the config.
provider_config
object
Replacement provider settings: provider (optional, defaults onepassword) and op_vault_id (required when provided).

Examples

curl -X PATCH https://agp.eu.hcompany.ai/api/v2/vaults/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
  -H "Authorization: Bearer $HAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "prod-1password-eu"}'

Errors

StatusCause
404Vault not found or you don’t have access.
422Body failed validation.