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": {}
}Projects
Create project
Create a new project in draft status
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
Response —
status: "draft". It can be promoted to
deploying via Deploy project.
Headers
string
required
Body
string
required
string
required
string
required
24-character hex ObjectId of a politics owned by the same user.
File[]
Optional list of input files to analyze.
Response — 201 Created
boolean
string
Project
Full inserted document including
_id, userId, status: "draft",
createdAt, updatedAt.Errors
| Status | Reason |
|---|---|
400 | Missing fields or invalid politicsId / file shape |
404 | politicsId does not exist for this user |
500 | S3 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..." }
]
}'