API Endpoints
Base URL: http://localhost:8787/api (dev) or https://os.supershyft.capital/api (prod)
Companies
List Companies
http
GET /api/companies?limit=50&offset=0&search=acme&status=activeQuery Parameters:
limit- Results per page (default: 50)offset- Pagination offset (default: 0)status- Filter by statuscountry_code- Filter by countryindustry_category- Filter by industrysearch- Text search in name/description
Response:
json
{
"data": [...],
"pagination": {
"total": 150,
"limit": 50,
"offset": 0,
"hasMore": true
}
}Semantic Search
http
GET /api/companies/search/semantic?q=AI+infrastructure&limit=20Query Parameters:
q- Search query (required)limit- Results per page (default: 20)offset- Pagination offsetstatus- Filter by statuscountry_code- Filter by country
Uses Workers AI + Vectorize for semantic similarity matching.
Get Company Detail
http
GET /api/companies/:idResponse:
json
{
"data": {
"company": {
"id": "cmp_abc123",
"name": "Acme Corp",
"country": "Belgium",
"revenue_eur": 25.5,
"llm_score_overall": 7500,
"executives": [...],
"enriched_data": {...}
},
"dealflow": {...},
"recent_activity": [...]
}
}Includes:
- Parsed JSON fields (executives, financials)
- Associated dealflow record
- Recent activity (last 10)
- R2 enrichment profile (if available)
Create Company
http
POST /api/companies
Content-Type: application/json
{
"name": "New Company",
"country": "Belgium",
"country_code": "BE",
"hq_city": "Brussels",
"industry_category": "Technology",
"activity_description": "Software development"
}Update Company
http
PATCH /api/companies/:id
Content-Type: application/json
{
"name": "Updated Name",
"status": "active",
"thesis_id": "th_xyz"
}Theses
List Theses
http
GET /api/thesesResponse:
json
{
"data": [
{
"id": "th_xyz",
"code": "TH-001",
"title": "European SaaS Scale-Ups",
"summary": "Targeting B2B SaaS...",
"status": "active"
}
]
}Get Thesis
http
GET /api/theses/:idReturns full thesis with markdown report content.
Dealflow
List Dealflow
http
GET /api/dealflow?stage=meetingQuery Parameters:
stage- Filter by stagestatus- Filter by status
Create Dealflow Entry
http
POST /api/dealflow
Content-Type: application/json
{
"company_id": "cmp_abc123",
"stage": "initial",
"probability": 20,
"notes": "Initial outreach sent"
}Update Dealflow Stage
http
PATCH /api/dealflow/:id
Content-Type: application/json
{
"stage": "meeting",
"probability": 40,
"notes": "Meeting scheduled"
}Activity
List Activity Log
http
GET /api/activity?limit=50&offset=0&entity_type=companyQuery Parameters:
limit- Results per page (default: 50)offset- Pagination offsetentity_type- Filter by type (company, dealflow, bulk_action)entity_id- Filter by entity IDuser_email- Filter by user
Response:
json
{
"data": [
{
"id": "act_xyz",
"activity_type": "company_created",
"entity_type": "company",
"entity_id": "cmp_abc123",
"user_email": "louis@supershyft.capital",
"timestamp": "2025-01-15T10:00:00Z",
"metadata": {...}
}
],
"pagination": {...}
}Stats
Get Dashboard Metrics
http
GET /api/statsResponse:
json
{
"data": {
"companies_total": 150,
"companies_active": 120,
"dealflow_active": 25,
"theses_active": 5
}
}Bulk Actions
Create Bulk Action
http
POST /api/bulk-actions
Content-Type: application/json
{
"action_type": "generate_embeddings",
"company_ids": ["cmp_1", "cmp_2", "cmp_3"],
"priority_override": 80
}Action Types:
generate_embeddingsllm_scoreenrich_profile
Priority: 10 (background) to 95 (urgent)
Response:
json
{
"data": {
"id": "ba_abc123",
"action_type": "generate_embeddings",
"status": "pending",
"total_companies": 3,
"processed_companies": 0,
"priority": 50
}
}List Bulk Actions
http
GET /api/bulk-actionsReturns bulk actions for current user.
Get Bulk Action Status
http
GET /api/bulk-actions/:idResponse:
json
{
"data": {
"id": "ba_abc123",
"status": "running",
"total_companies": 100,
"processed_companies": 67,
"failed_companies": 2,
"error_summary": {...}
}
}Update Bulk Action (AI Worker)
http
PATCH /api/bulk-actions/:id
Content-Type: application/json
{
"status": "completed",
"processed_companies": 100,
"completed_at": "2025-01-15T10:30:00Z"
}Users
Get/Create User
http
GET /api/users/:emailAuto-creates user if not exists.
Response:
json
{
"data": {
"email": "louis@supershyft.capital",
"name": "Louis De Cuypere",
"role": "partner",
"preferences": {
"view_mode": "comfortable",
"notifications_enabled": true
}
}
}Update User Preferences
http
PATCH /api/users/:email
Content-Type: application/json
{
"preferences": {
"view_mode": "compact",
"notifications_enabled": false
}
}Feedback
Submit Feedback
http
POST /api/feedback
Content-Type: application/json
{
"type": "bug",
"title": "Button not working",
"description": "The save button doesn't respond",
"page": "/companies",
"user_email": "louis@supershyft.capital"
}Creates issue in Linear workspace.
Response:
json
{
"success": true,
"issue_id": "SUP-123",
"url": "https://linear.app/..."
}R2 Assets
Get Company Artifacts
http
GET /r2/companies/:id/profile.json
GET /r2/companies/:id/source.csvProxied through API worker with caching.
Error Responses
json
{
"error": "Error message",
"details": "Additional context"
}Status Codes:
400- Bad Request (validation failed)401- Unauthorized404- Not Found500- Internal Server Error503- Service Unavailable (e.g., Vectorize not configured)
Authentication
Dev Mode: Send X-User-Email header
bash
curl -H "X-User-Email: louis@supershyft.capital" http://localhost:8787/api/companiesProduction: Cloudflare Zero Trust JWT (pending configuration)