API Reference

Build custom integrations with the PE OS REST API. All endpoints require authentication via Bearer token.

Base URL:https://pe-os.onrender.com/api
key

Authentication

PE OS uses Supabase Auth with JWT tokens. Obtain a token by signing in through the Supabase Auth API, then include it as a Bearer token in all requests.

// Include in all API requests
Authorization: Bearer YOUR_SUPABASE_JWT_TOKEN
Note: Tokens expire after 1 hour. Use the Supabase refresh token flow to obtain new access tokens without re-authenticating.

Endpoints

handshake

Deals

Create, read, update, and delete deals in your pipeline

expand_more
GET/api/deals

List all deals for the authenticated user's organization. Supports filtering and pagination.

Query params:status, stage, search, sortBy, sortOrder, limit, offset
GET/api/deals/:id

Get a single deal with all details including company, documents, activities, and team members.

POST/api/deals

Create a new deal manually.

{
  "name": "Acme Corp Acquisition",
  "industry": "Manufacturing",
  "stage": "INITIAL_REVIEW",
  "dealSize": 50,
  "revenue": 25,
  "ebitda": 8
}
PATCH/api/deals/:id

Update deal fields. Supports optimistic locking via lastKnownUpdatedAt to prevent concurrent edit conflicts (returns 409 if stale).

DELETE/api/deals/:id

Delete a deal and all associated data (documents, activities, memos). Admin or deal creator only.

POST/api/deals/:id/analyze

Trigger multi-document analysis. Requires 2+ documents. Detects conflicts, fills gaps, and synthesizes insights across all documents.

POST/api/deals/:id/chat

Chat with a deal using AI. Sends a question and receives an AI-generated answer based on all deal documents (RAG).

{ "message": "What is the company's revenue growth trend?" }
upload_file

Deal Ingestion

Import deals from files, text, URLs, or emails

expand_more
POST/api/ingest

Upload a document file (PDF, Word, Excel, CSV, text). Uses multipart form data. Excel/CSV files are auto-routed to bulk import.

Content-Type: multipart/form-data
Body: file (binary)
POST/api/ingest/text

Create a deal from pasted text content.

{
  "text": "Deal content text...",
  "sourceType": "email"  // email | note | slack | whatsapp | other
}
POST/api/ingest/url

Research a company from its website URL. Scrapes multiple pages and extracts deal data.

{
  "url": "https://acme.com",
  "companyName": "Acme Corp",       // optional override
  "autoCreateDeal": true            // false = preview only
}
POST/api/ingest/email

Upload a .eml email file. Parses email body for deal data and auto-processes PDF attachments.

Content-Type: multipart/form-data
Body: file (.eml)
POST/api/ingest/bulk

Bulk import deals from an Excel or CSV file. Each row creates a separate deal. Returns imported/failed/total counts.

description

Memos

Create and manage investment memos with AI assistance

expand_more
GET/api/memos?dealId=:dealId

List all memos for a deal.

POST/api/memos

Create a new investment memo for a deal.

{
  "dealId": "uuid",
  "title": "Investment Memo - Acme Corp",
  "templateId": "standard"   // optional: use a memo template
}
POST/api/memos/:id/generate

AI-generate content for a specific memo section.

{ "section": "executive_summary" }
download

Export & Audit

Export data and view audit trails

expand_more
GET/api/export/deals?format=csv

Export all deals as CSV or JSON. Supported formats: csv, json. CSV includes headers: Name, Industry, Revenue, EBITDA, Stage, Status, Confidence, Created.

GET/api/audit

View audit log entries. Filter by action, resourceType, resourceId, severity, date range. Paginated with limit/offset.

Query params:action, resourceType, resourceId, severity, startDate, endDate, limit, offset
group

Users & Invitations

Manage team members and workspace invitations

expand_more
GET/api/users/me

Get the authenticated user's profile, role, organization, and preferences.

GET/api/users/team

List all team members in the user's organization.

POST/api/invitations

Invite a new team member. Admin only.

{
  "email": "analyst@firm.com",
  "role": "MEMBER"   // ADMIN | MEMBER | VIEWER
}

Rate Limits

TierLimitWindowApplies To
General200 requests15 minutesAll GET endpoints
Write30 requests1 minutePOST, PATCH, DELETE endpoints
AI10 requests1 minuteChat, ingestion, memo generation

Need help with integrations?

Contact our team for guidance on building custom integrations with PE OS.

mailContact Support