Download OpenAPI specification:Download
Logs in an existing user using email/password. Returns a JWT-like token on success.
| email required | string <email> |
| password required | string <password> |
{- "email": "",
- "password": ""
}{- "status": "success",
- "message": "Login successful.",
- "data": {
- "token": "eyJ0eXAiOiJKV1QiLCJh...",
- "user_id": 1,
- "user_name": ""
}
}Fetches the user's active projects (not deleted), templates, reports, documents, and basic user info in a single response.
{- "status": "success",
- "message": "User content retrieved successfully.",
- "data": {
- "user": {
- "id": 2,
- "name": "Will",
- "email": "will@primeunicornindex.com"
}, - "projects": [
- {
- "id": 10,
- "name": "Test Project",
- "entity_type": "asset",
- "entity_name": "Amazon"
}
], - "templates": [ ],
- "reports": [ ],
- "documents": [ ]
}
}Creates a new project under the authenticated user. Requires a JSON body with name, entity_type, entity_name.
| name required | string |
| entity_type required | string |
| entity_name required | string |
{- "name": "Test Dec 25",
- "entity_type": "asset",
- "entity_name": "Amazon"
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Sets deleted_at to the current time. The project remains in the database but is considered inactive.
| projectId required | integer The project's ID |
{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Returns all queries belonging to a specific thread, provided the user owns the project that the thread is part of.
| threadId required | integer The thread ID |
{- "status": "success",
- "message": "Thread queries retrieved successfully.",
- "data": [
- {
- "id": 101,
- "question": "Is the preferred stock redeemable?",
- "answer": "Yes, under clause 4.2...",
- "category": "Equity Financing Terms",
- "sub_category": "Redemption Rights"
}
]
}| threadId required | integer |
{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Given a list of document IDs and a query text, the system returns an AI-generated answer, categorization, etc.
| documents required | Array of integers |
| project_id required | integer |
| query required | string |
| category | string |
| sub_category | string |
| type | string Example: 'os' |
| length | string Example: 'short' or 'long' |
{- "documents": [
- 44
], - "project_id": 1,
- "query": "Is the preferred stock redeemable?",
- "category": "",
- "sub_category": "",
- "type": "os",
- "length": "short"
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Receives one or more files. Files are associated with the user and a specific Project. Then they're parsed or stored internally.
| projectId required | integer |
| files | Array of strings <binary> [ items <binary > ] |
{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Given a report ID and a list of question objects, the system returns multiple AI-generated answers, grouped or enumerated by the original questions.
| report_id required | integer |
required | Array of objects |
{- "report_id": 40,
- "questions": [
- {
- "question": "Does this document explicitly disclose any IPO ratchets?",
- "category": "Equity Financing Terms",
- "sub_category": "IPO Ratchets"
}, - {
- "question": "Does the document disclose a pay-to-play clause?",
- "category": "Equity Financing Terms",
- "sub_category": "Special Mandatory Conversion"
}
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Expects a JSON body with an array of document_ids to remove from the specified Project.
| projectId required | integer |
| document_ids required | Array of integers |
{- "document_ids": [
- 16
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Given a list of filenames, returns presigned URLs to allow uploading directly to S3.
| projectId required | integer |
| file_names required | Array of strings |
{- "file_names": [
- "test.pdf",
- "another.pdf"
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Receives an array of S3 URLs. The system will parse and store them as documents linked to the specified project.
| projectId required | integer |
required | Array of objects |
{- "files": [
- {
- "name": "celery 4.pdf",
}
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Direct PUT to S3 with the presigned query parameters. This endpoint is auto-generated by AWS or your backend presigning logic.
| AWSAccessKeyId | string |
| Signature | string |
| content-type | string |
| Expires | string |
Creates a template under the current user.
| name required | string |
{- "name": "t back"
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Deletes existing questions for the template, then inserts the provided list of new questions.
| templateId required | integer |
Array of objects |
{- "questions": [
- {
- "question": "check",
- "category": "a",
- "sub_category": "b"
}
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Can create either a "thread-based" or "template-based" report, based on the supplied body. - If type=thread, you can attach threads. - If type=template, attach a template_id.
| template_id | integer or null |
| name required | string |
| type required | string Either 'thread' or 'template' |
| status required | string |
| project_id required | integer |
| thread_ids | Array of integers |
| sources | object Optional source structure, e.g. {web: false, documents: [11]} |
{- "name": "Sample unified thread",
- "type": "thread",
- "status": "finished",
- "thread_ids": [
- 6
], - "project_id": 6
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Only valid if the report's type is "thread". Otherwise, returns an error.
| reportId required | integer |
{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Accepts Markdown in the request body (text/markdown or text/plain) and returns a PDF or some form of processed output.
# Sample Markdown This is a document in **markdown** format. ...
{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}Expects a list of question objects with optional category/sub-category.
| question required | string |
| category | string |
| sub_category | string |
[- {
- "question": "t question",
- "category": "test cat",
- "sub_category": "test subcat"
}
]{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}| question_ids required | Array of integers |
{- "question_ids": [
- 2,
- 3
]
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}| questionId required | integer |
| question | string |
| category | string |
| sub_category | string |
{- "category": "New category2",
- "sub_category": "New subcategory",
- "question": "How much revenue does Google have?"
}{- "status": "success",
- "message": "Operation succeeded.",
- "data": { }
}