---
title: "Upload Project Document"
method: POST
path: "/api/v1/da-project/{project_id}/documents"
tags: ["da-project"]
---

# Upload Project Document

`POST /api/v1/da-project/{project_id}/documents`

## Request

- Base URL: `https://api.casaintelligence.com.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.casaintelligence.com.au/api/v1/da-project/{project_id}/documents`
- Auth: HTTP bearer

Upload a project document (consultant report, council RFI, etc.).

Authenticated + ownership-checked (owner org or founder). Stores the file
in the private project-documents Supabase Storage bucket, records a
ci_tp_project_documents row, and writes a customer-visible activity. Storage
failures surface as a clean 502 rather than a 500 — the project page stays
healthy.

WS6C — two-way choreography: an optional ``requirement_id`` (or ``doc_type``)
ties the upload to a specific document requirement, flipping that requirement
to ``received`` and linking the new document. This is how a customer
fulfilling "Architectural plans" or "Engineering plans" advances the
submission gate. When a requirement is fulfilled, the stored document's
category is set to the requirement's ``doc_type`` so the lodgement manifest
matches it (e.g. an engineering plan set lands as a ``plans``-aliased doc).

## Path parameters

- `project_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine.md) · [All operations](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/llms.txt) · [OpenAPI document](https://skmtc.dev/casaintelligence/apis/casa-intelligence-engine/revisions/71d711039de0?raw)
