API Reference
App Credentials
List App Credentials
- API Name: List Application Credentials
- API Route:
GET /api/v1/app-credentials - Request:
- Query Params:
credentialTypeId(string, optional),search(string, optional),page(number, default: 1),pageSize(number, default: 20) - Auth: Session required
- Query Params:
- What it does: Returns a paginated list of application credentials belonging to the authenticated user. Can be filtered by credential type or searched by name.
- Returns: Paginated result
{ data: [...], total, page, pageSize }
Create App Credential
- API Name: Create Application Credential
- API Route:
POST /api/v1/app-credentials - Request:
- Body:
json
{
"credentialName": "string (required)",
"credentialTypeId": "string (required)",
"description": "string (optional)",
"keys": [
{ "fieldId": "string", "keyValue": "any" }
],
"projectIds": ["string"]
}- What it does: Creates a new application credential with encrypted key-value pairs. Each key must reference a valid field from the credential type. Optionally assigns the credential to one or more projects at creation time.
- Returns:
201with the created credential object.400if required fields are missing or key format is invalid.
Get App Credential
- API Name: Get Credential by ID
- API Route:
GET /api/v1/app-credentials/[id] - Request:
- Params:
id(string) — Credential ID - Auth: Session required (must be the credential owner)
- Params:
- What it does: Fetches a single credential by ID. Secret values are not decrypted or returned in this call.
- Returns: The credential object (without decrypted secrets).
404if not found.
Update App Credential
- API Name: Update Application Credential
- API Route:
PUT /api/v1/app-credentials/[id] - Request:
- Params:
id(string) — Credential ID - Body: Any updatable fields (name, description, keys, etc.)
- Auth: Session required (must be the credential owner)
- Params:
- What it does: Updates an existing application credential's fields. Passes all body fields to the repository update function.
- Returns: The updated credential object.
Delete App Credential
- API Name: Delete Application Credential
- API Route:
DELETE /api/v1/app-credentials/[id] - Request:
- Params:
id(string) — Credential ID - Auth: Session required (must be the credential owner)
- Params:
- What it does: Permanently deletes an application credential and all its associated key-value pairs.
- Returns:
{ "success": true }
Assign Credential to Projects
- API Name: Assign Credential to Projects
- API Route:
POST /api/v1/app-credentials/[id]/assign-projects - Request:
- Params:
id(string) — Credential ID - Body:
- Params:
json
{
"projectIds": ["string", ...]
}- What it does: Assigns (or re-assigns) the credential to a set of projects, replacing any existing project assignments.
- Returns: The updated assignment records.
Get Credentials by Project
- API Name: Get Credentials for a Project
- API Route:
GET /api/v1/app-credentials/by-project/[projectId] - Request:
- Params:
projectId(string) — Project ID - Auth: Session required
- Params:
- What it does: Returns all application credentials assigned to the specified project.
- Returns: Array of credential objects assigned to that project.