Skip to main content
POST
/
projects
curl -X POST "https://api.dabarai.com/v1/projects" \
  -H "api-token: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sugar Mill Analysis",
    "description": "Quarterly compliance run",
    "politicsId": "69aa51d188c08a82d22fb2d8",
    "files": [
      { "name": "report.pdf", "type": "document", "url": "https://cdn.example.com/report.pdf" },
      { "name": "notes.txt", "type": "text", "content": "Raw notes here..." }
    ]
  }'
{
  "success": true,
  "message": "<string>",
  "data": {}
}
The project is created with status: "draft". It can be promoted to deploying via Deploy project.

Headers

api-token
string
required

Body

name
string
required
description
string
required
politicsId
string
required
24-character hex ObjectId of a politics owned by the same user.
files
File[]
Optional list of input files to analyze.

Response — 201 Created

success
boolean
message
string
data
Project
Full inserted document including _id, userId, status: "draft", createdAt, updatedAt.

Errors

StatusReason
400Missing fields or invalid politicsId / file shape
404politicsId does not exist for this user
500S3 upload failure for a text file
curl -X POST "https://api.dabarai.com/v1/projects" \
  -H "api-token: YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sugar Mill Analysis",
    "description": "Quarterly compliance run",
    "politicsId": "69aa51d188c08a82d22fb2d8",
    "files": [
      { "name": "report.pdf", "type": "document", "url": "https://cdn.example.com/report.pdf" },
      { "name": "notes.txt", "type": "text", "content": "Raw notes here..." }
    ]
  }'