---
title: "Rotate the API key and/or rename a credential"
method: PATCH
path: "/vault/credentials/{credentialId}"
tags: ["vault"]
---

# Rotate the API key and/or rename a credential

`PATCH /vault/credentials/{credentialId}`

## Request

- Base URL: `https://api.letsship.ai/v1`
- URL: `https://api.letsship.ai/v1/vault/credentials/{credentialId}`
- Auth: none declared

## Path parameters

- `credentialId` string, required

## Request body

- UpdateVaultCredentialRequest
  - `apiKey` string
  - `displayName` string, nullable

## Response `200`

Updated

- VaultCredential
  - `id` string, required
  - `orgId` string, required
  - `vendor` string, required
  - `vendorKind` 'tracker' | 'scm' | 'llm' | 'notification', required
  - `authScheme` 'oauth2' | 'api_key', required
  - `credentialType` 'oauth' | 'api', nullable
  - `displayName` string, nullable, required
  - `dependentProjectCount` integer, required
  - `createdAt` integer, required
  - `updatedAt` integer, required

## Other responses

- `400`: Invalid
- `403`: Role insufficient
- `404`: Not found

---

[API](https://skmtc.dev/letsship/apis/ship-api.md) · [All operations](https://skmtc.dev/letsship/apis/ship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/letsship/apis/ship-api/revisions/e6eac1bcadd4?raw)
