curl --request POST \
--url https://www.useroulette.com/api/v1/companies/upload/ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'text=From: founder@startup.com
Subject: Intro - TechCo Series A
Hi, I'\''m the founder of TechCo. We'\''re building AI tools for developers.
Here'\''s our deck: https://docsend.com/view/abc123
We'\''re currently raising a $5M Series A.
' \
--form account_id=550e8400-e29b-41d4-a716-446655440000 \
--form file_0='@example-file' \
--form file_1='@example-file' \
--form file_2='@example-file' \
--form file_3='@example-file'{
"success": true,
"data": {
"company": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "TechCo",
"visibility": "team",
"source": "email",
"company_status_id": "initial-review-uuid",
"notes": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"pdfDownloadUrl": "https://storage.useroulette.com/signed-url...",
"attachments": [
{
"id": "attach-uuid-1",
"title": "Financial Model.xlsx",
"filePath": "companies/7c9e6679/attachments/financial-model.xlsx",
"attachmentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
],
"analysis": {
"detectedUrls": [
"https://docsend.com/view/abc123"
],
"selectedDeckUrl": "https://docsend.com/view/abc123",
"aiReasoning": "Selected DocSend URL as primary deck source (high priority platform)",
"contextAnalysis": {
"statusDetected": true,
"statusReasoning": "Email mentions 'Series A raise' - assigned to fundraising stage",
"sourceDetected": true,
"sourceReasoning": "Content appears to be a forwarded email from founder"
},
"processedAt": "2024-01-15T10:30:00Z"
}
},
"authType": "api_key"
}{
"success": false,
"error": "Invalid request body",
"data": null
}{
"success": false,
"error": "Invalid or expired API key",
"data": null
}{
"success": false,
"error": "Internal server error",
"data": null
}Create company with AI processing
The recommended way to create companies in Roulette.
This intelligent endpoint accepts unstructured text (emails, notes, form data) and file attachments, then uses AI to automatically:
- Extract URLs from text using regex (handles long signed URLs from DocSend, Tally, etc.)
- Prioritize deck sources by known platforms (DocSend, Papermark, Brieflink, Google Drive)
- Select the best pitch deck from URLs or files
- Auto-detect company status based on content context
- Auto-detect source (email, referral, form, etc.) from content
- Upload remaining files as attachments
How It Works
URL Priority (Highest → Lowest)
- DocSend links
- Papermark links
- Brieflink links
- Tally storage URLs
- Google Drive links
- Other URLs
File Processing Logic
- Single file: Always treated as the pitch deck (regardless of type)
- Multiple files: AI analyzes PDF content to select the best deck candidate
- Fallback: First PDF file if AI can’t determine
Context Analysis
When text content is provided (>50 chars), the AI analyzes it to:
- Detect appropriate pipeline status based on conversation context
- Identify the source (email forward, referral mention, etc.)
Use Cases
- Email forwarding: Paste the full email body + attachments
- Form submissions: Send form data as text + any uploaded files
- Manual entry: Provide company info + deck URL or file
- Bulk import: Process founder outreach emails automatically
curl --request POST \
--url https://www.useroulette.com/api/v1/companies/upload/ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'text=From: founder@startup.com
Subject: Intro - TechCo Series A
Hi, I'\''m the founder of TechCo. We'\''re building AI tools for developers.
Here'\''s our deck: https://docsend.com/view/abc123
We'\''re currently raising a $5M Series A.
' \
--form account_id=550e8400-e29b-41d4-a716-446655440000 \
--form file_0='@example-file' \
--form file_1='@example-file' \
--form file_2='@example-file' \
--form file_3='@example-file'{
"success": true,
"data": {
"company": {
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"account_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "TechCo",
"visibility": "team",
"source": "email",
"company_status_id": "initial-review-uuid",
"notes": null,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"pdfDownloadUrl": "https://storage.useroulette.com/signed-url...",
"attachments": [
{
"id": "attach-uuid-1",
"title": "Financial Model.xlsx",
"filePath": "companies/7c9e6679/attachments/financial-model.xlsx",
"attachmentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
],
"analysis": {
"detectedUrls": [
"https://docsend.com/view/abc123"
],
"selectedDeckUrl": "https://docsend.com/view/abc123",
"aiReasoning": "Selected DocSend URL as primary deck source (high priority platform)",
"contextAnalysis": {
"statusDetected": true,
"statusReasoning": "Email mentions 'Series A raise' - assigned to fundraising stage",
"sourceDetected": true,
"sourceReasoning": "Content appears to be a forwarded email from founder"
},
"processedAt": "2024-01-15T10:30:00Z"
}
},
"authType": "api_key"
}{
"success": false,
"error": "Invalid request body",
"data": null
}{
"success": false,
"error": "Invalid or expired API key",
"data": null
}{
"success": false,
"error": "Internal server error",
"data": null
}Authorizations
API key authentication. Generate keys from your account settings.
Include in header: Authorization: Bearer YOUR_API_KEY
Body
Unstructured text content to process. Can include:
- Full email body (with headers)
- Form submission data
- Meeting notes
- URLs to pitch decks (DocSend, Google Drive, etc.)
The AI will extract URLs and analyze context to determine company status and source automatically.
1"From: founder@startup.com\nSubject: TechCo - Series A Deck\n\nHi, here's our pitch deck: https://docsend.com/view/abc123\n\nWe're raising $5M at a $20M pre-money valuation.\n"
Account/team ID to create the company under
Optional company name override. If not provided, the AI will attempt to extract it from the text or deck.
Visibility level for the new company
private, shared, team Optional internal notes
Optional status override. If not provided, the AI will attempt to detect an appropriate status from the content.
Optional source override. If not provided, the AI will attempt to detect the source from content context.
manual, email, form, referral, website, event, other Optional custom metadata to merge with AI-extracted data
First file attachment (pitch deck or supporting document)
Second file attachment
Third file attachment
Fourth file attachment (up to 10 files supported via file_N pattern)

