Skip to Content
Docs are evolving — expect frequent updates.
CompanyCreate

Create Company

Create a new company (project) in Kruncher can be done in three different ways.

Three ways to create a company:

  • projectAnalysisWithFile
    Creates a project intended for file-based analysis.

  • projectAnalysisNoFile
    Runs analysis using the website only.

  • projectNoAnalysis
    Creates a project without analysis.

Endpoint

POST https://api.kruncher.ai/api/integration/project

Request body

CODE
{
  "name": "Your Company Nickname",
  "companyName": "Your Company Name",
  "companyWebsite": "https://yourcompany.com",
  "projectType": "projectAnalysisWithFile",
  "docLink": "https://example.com/document.pdf",
  "email": "user@example.com",
  "password": "password123",
  "notesText": "Additional notes about the company..."
}

Fields

FieldTypeRequiredDescription
namestringOptionalProject nickname (optional).
companyNamestringRequiredFull legal/company name.
companyWebsitestring (URL)Required when projectType is projectAnalysisNoFile, otherwise optionalCompany website URL.
projectTypestringRequiredControls whether analysis is triggered. See Three ways to create a company below.
docLinkstring (URL)OptionalPublic document URL. When provided with projectAnalysisWithFile, the file is downloaded and analyzed automatically.
emailstringOptionalCredential for accessing protected docLink URLs.
passwordstringOptionalCredential for accessing protected docLink URLs.
notesTextstringOptionalFree-text notes that are converted into a file and used for analysis.

Behavior notes

  • For projectAnalysisWithFile:

    • docLink downloads and triggers analysis
    • notesText creates a file and triggers analysis
    • If neither is provided, upload is manual
  • For projectAnalysisNoFile:

    • companyWebsite is required
    • Other file fields are ignored

Code Examples

JavaScript/TypeScript

CODE
const apiKey = "YOUR_API_KEY_HERE";
 
const response = await fetch("https://api.kruncher.ai/api/integration/project", {
  method: "POST",
  headers: {
    "Authorization": `${apiKey}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    name: "Acme",
    companyName: "Acme Corporation",
    companyWebsite: "https://acme.com",
    projectType: "projectAnalysisNoFile"
  })
});
 
const { project, analysisId } = await response.json();
console.log("Project created:", project.id);
console.log("Analysis ID:", analysisId);

Result: Website-based analysis is triggered automatically.

Python

CODE
import requests
 
API_KEY = "YOUR_API_KEY_HERE"
url = "https://api.kruncher.ai/api/integration/project"
 
headers = {
    "Authorization": f"{API_KEY}",
    "Content-Type": "application/json"
}
 
data = {
    "name": "Acme",
    "companyName": "Acme Corporation",
    "companyWebsite": "https://acme.com",
    "projectType": "projectAnalysisNoFile"
}
 
response = requests.post(url, headers=headers, json=data)
result = response.json()
 
print(f"Project created: {result['project']['id']}")
print(f"Analysis ID: {result['analysisId']}")

Result: Website-based analysis is triggered.

cURL

CODE
curl -X POST "https://api.kruncher.ai/api/integration/project" \
  -H "Authorization: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme",
    "companyName": "Acme Corporation",
    "companyWebsite": "https://acme.com",
    "projectType": "projectAnalysisNoFile"
  }'

Response

Returns the project and analysis ID.

CODE
{
  "project": {
    "id": "proj_123",
    "name": "Acme",
    "companyName": "Acme Corporation",
    "companyWebsite": "https://acme.com",
    "projectType": "projectAnalysisWithFile"
  },
  "analysisId": "analysis_456"
}
Last updated on