Credentials API
Base path: /api/credentials
GET /api/credentials
List all credentials. Secret values are masked (first 4 chars + ****).
Response 200:
[ { "id": "cred_abc", "name": "ConnectWise PSA Production", "type": "api_key", "value": "lKj0****", "description": "Live PSA API credentials", "tags": ["connectwise", "production"], "createdAt": "2024-01-10T08:00:00.000Z" }]GET /api/credentials/:id
Get a single credential. Returns the unmasked secret value.
POST /api/credentials
Store a new credential.
Request body:
{ "name": "ConnectWise PSA Production", "type": "api_key", "value": "the-secret-value", "description": "Used by the PSA integration agent", "tags": ["connectwise", "production"]}| Field | Type | Required |
|---|---|---|
name |
string | Yes |
type |
"api_key" | "oauth" | "basic" | "custom" |
Yes |
value |
string | Yes |
description |
string | No |
tags |
string[] | No |
PUT /api/credentials/:id
Update credential metadata (name, description, tags). To update the value, use the rotate endpoint.
DELETE /api/credentials/:id
Delete a credential permanently.
POST /api/credentials/:id/rotate
Replace the secret value while keeping the same credential ID.
Request body: { "value": "new-secret-value" }
Response 200: Updated credential with masked value.