---
title: "Add an API-key credential (encrypted at rest). OAuth vendors use the connect flow."
method: POST
path: "/vault/credentials"
tags: ["vault"]
---

# Add an API-key credential (encrypted at rest). OAuth vendors use the connect flow.

`POST /vault/credentials`

## Request

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

## Request body

- CreateVaultCredentialRequest
  - `vendor` string, required
  - `apiKey` string, required
  - `displayName` string, nullable

## Response `200`

Created

- 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`: No org for caller

---

[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)
