Skip to main content

Postman Collection

The Co-mind.ai API ships with a complete Postman collection and environment for interactive testing. This guide walks you through setup and common workflows.

Files

FileDescription
comind-Private-AI-Platform-API.postman_collection.jsonComplete API collection (130+ endpoints)
comind-Private-AI-Platform.postman_environment.jsonEnvironment variables with auto-population

Setup

1

Import the Collection

  1. Open Postman
  2. Click Import
  3. Select comind-Private-AI-Platform-API.postman_collection.json
  4. Click Import
2

Import the Environment

  1. Click Import again
  2. Select comind-Private-AI-Platform.postman_environment.json
  3. Click Import
3

Configure Environment Variables

  1. Select “comind Private AI Platform - Local” environment (top-right dropdown)
  2. Click the eye icon to view/edit variables
  3. Update these values:
base_url:       http://localhost:3001  (or your server URL)
user_email:     your-email@example.com
user_password:  your-password
4

Authenticate

Choose one of these options:
The collection uses pat_token as the default auth for all requests. Auth endpoints and PAT management endpoints override this to use JWT or no auth as appropriate.

Example Workflows

PAT Token Setup

1. Login                    → POST /v1/auth/login
                              → Saves: access_token, refresh_token, user_id

2. Create API Token (PAT)   → POST /v1/api-tokens (uses JWT)
                              → Saves: pat_token, pat_token_id
                              → Token value shown only once!

3. All subsequent requests use pat_token automatically

RAG Chat Workflow

1

Check Available Models

Run GET /v1/models to see what’s available.
2

Create Knowledge Base

Run POST /v1/knowledgebases — the KB ID is saved automatically.
3

Upload Documents

Run POST /v1/knowledgebases/{kb_id}/files — upload PDF, DOCX, TXT, CSV files.
4

Query Knowledge Base

Run POST /v1/knowledgebases/query — test with “What are the main topics?”
5

Chat with Knowledge Base

Run POST /v1/knowledgebase/chat/completions — ask questions about your documents.

Stateful Chat Session

1. Create Chat Session       → POST /v1/chat/sessions
                               → Saves: session_id

2. Send Messages             → POST /v1/chat/sessions/{id}/messages
                               → Server manages history

3. Get Message History       → GET /v1/chat/sessions/{id}/messages

4. Clear or Delete Session   → POST /v1/chat/sessions/{id}/clear
                             → DELETE /v1/chat/sessions/{id}

Environment Variables

VariableDescriptionAuto-populated?
base_urlAPI server URLNo
user_emailYour emailNo
user_passwordYour passwordNo
pat_tokenPersonal Access TokenYes — from Create API Token
pat_token_idPAT token IDYes — from Create API Token
access_tokenJWT access tokenYes — from Login
refresh_tokenJWT refresh tokenYes — from Login
user_idYour user IDYes — from Login
kb_idLast created KB IDYes — from Create KB
file_idLast uploaded file IDYes — from Upload File
session_idLast session IDYes — from Create Chat Session
echo_job_idLast transcription job IDYes — from Async Transcribe
tenant_idTenant/org ID for admin opsNo

API Endpoint Categories

The collection is organized into these folders:
FolderEndpointsDescription
Authentication13Login, SSO, refresh, registration, password reset
API Tokens (PAT)6Create, list, revoke, rotate tokens, list scopes
Knowledge Base Management4Create, list, get, delete knowledge bases
File Management3Upload, list, delete files in KBs
AI Models & Inference6Models, chat, completions, embeddings
Query & Chat (RAG)3KB queries, KB-enhanced chat, vision+RAG
Chat Sessions8Stateful chat with server-managed history
Discovery3Backends, capabilities, health checks
Echo Engine16Transcription, recordings, TTS
Sanitizer Admin4Security policy management
Document Analyzer19Document extraction and review
Researcher24Search, research, analysis, synthesis
Directory Admin8LDAP/AD configuration
Entra Admin6Azure AD configuration
Tenant Admin14Tenant and sub-org management
Audit Logs1Query audit logs

Supported File Types

Documents: PDF, Word (.docx, .doc), Text (.txt) Spreadsheets: Excel (.xlsx, .xls), CSV (.csv) Presentations: PowerPoint (.pptx) Images: JPG, PNG, GIF, BMP

Troubleshooting

  • Check that pat_token or access_token is set in the environment
  • If using JWT, it may be expired — run the Refresh Token request
  • If using PAT, check it hasn’t been revoked or expired
  • Run “Create Knowledge Base” first
  • Check kb_id is set in the environment variables
  • Check file format is supported (see list above)
  • Verify kb_id is correct
  • Wait for file processing to complete (status: "completed")
  • Lower min_score (try 0.1)
  • Try different query terms