Skip to main content
POST
/
companies
/
upload
/
ai
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"
}

Authorizations

Authorization
string
header
required

API key authentication. Generate keys from your account settings.

Include in header: Authorization: Bearer YOUR_API_KEY

Body

multipart/form-data
text
string
required

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.

Minimum string length: 1
Example:

"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_id
string<uuid>
required

Account/team ID to create the company under

name
string

Optional company name override. If not provided, the AI will attempt to extract it from the text or deck.

visibility
enum<string>
default:team

Visibility level for the new company

Available options:
private,
shared,
team
notes
string

Optional internal notes

company_status_id
string<uuid>

Optional status override. If not provided, the AI will attempt to detect an appropriate status from the content.

source
enum<string>

Optional source override. If not provided, the AI will attempt to detect the source from content context.

Available options:
manual,
email,
form,
referral,
website,
event,
other
metadata
object

Optional custom metadata to merge with AI-extracted data

file_0
file

First file attachment (pitch deck or supporting document)

file_1
file

Second file attachment

file_2
file

Third file attachment

file_3
file

Fourth file attachment (up to 10 files supported via file_N pattern)

Response

Company created successfully with AI analysis

success
boolean
required
Example:

true

data
object
required
authType
enum<string>
Available options:
api_key,
session