Skip to content
API reference / Writeback endpoints
Open app

Writeback endpoints

These endpoints mutate Colabra state. Use them with bearer auth.

Read this page as the “save work back into the project” layer. The common writeback actions are:

  • create or resolve a request
  • add a comment or reply in context
  • create or update a report
  • upload a new file
  • manage reusable templates

Requests and comments

MethodPathPurposeNotes
GET/v1/requestsList open requestsFilter with workspaceId, optional projectId, optional taskId
POST/v1/requestsCreate a request tied to a taskRequires taskId, title, body
POST/v1/requests/{requestId}/resolveResolve a request through its threadCan use body; defaults to "Resolved"
GET/v1/commentsList comments for a targetSupports targets such as project, task, file, report, entity, request
POST/v1/commentsCreate a top-level comment or thread actionRequires targetId and bodyMarkdown
POST/v1/comments/replyReply to a commentRequires targetId, parentCommentId, bodyMarkdown

Idempotency

The request and comment creation flows support idempotencyKey in the request body. Use it when retries are possible and duplicate comments or requests would be harmful.

Example: create a request

Terminal window
curl -X POST "$COLABRA_API_URL/v1/requests" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "'"$WORKSPACE_ID"'",
"taskId": "TSK-7",
"title": "Provide signed customer schedule",
"body": "The latest version is unsigned and missing the latest renewal terms.",
"idempotencyKey": "req-pro42-task7-customer-schedule"
}'

Reports and templates

MethodPathPurposeNotes
POST/v1/reportsCreate a new reportRequires projectId; optional name, summary, bodyMarkdown, assigneeId
POST/v1/reports/{reportId}Update a reportSupports name, summary, bodyMarkdown, assigneeId
POST/v1/reports/generateQueue AI report generationRequires projectId, templateId, and phase
POST/v1/templatesCreate a workspace text templateRequires workspaceId and name
POST/v1/templates/{templateUuid}Update a workspace text templateSupports name and summary
POST/v1/templates/{templateUuid}/deleteSoft-delete a workspace text templateReturns { deleted: true }

Example: generate a report

Terminal window
curl -X POST "$COLABRA_API_URL/v1/reports/generate" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "'"$WORKSPACE_ID"'",
"projectId": "PRO-42",
"templateId": "dd-red-flag-memo",
"phase": "PHASE_1",
"focusInstructions": "Bias towards commercial concentration risk and change-of-control clauses."
}'

File upload

MethodPathPurposeNotes
POST/v1/filesUpload a standalone project fileRequires projectId, filename, and contentBase64

Optional fields on upload:

  • mimeType
  • provider
  • metadata

Enforced limit: 20 MB after base64 decoding.

Upload example

Terminal window
curl -X POST "$COLABRA_API_URL/v1/files" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workspaceId": "'"$WORKSPACE_ID"'",
"projectId": "PRO-42",
"filename": "customer-master-services-agreement.pdf",
"mimeType": "application/pdf",
"contentBase64": "'"$BASE64_CONTENT"'"
}'

Writeback rules worth keeping

  • Create requests from the task that owns the work, not from a side channel.
  • Keep comment bodies in Markdown so they are consistently rendered to HTML server-side.
  • Use report generation for structured outputs and Templates for reusable drafting snippets.

In other words: write back into the same object model the team already uses. That is what keeps the integration aligned with the live diligence workflow instead of creating parallel records elsewhere.