> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dabarai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Append files to project

> Append files to a project still in draft status

Only works while the project is in `"draft"` status. Files in the body are
appended to the existing `files` array; nothing is replaced.

## Path parameters

<ParamField path="id" type="string" required />

## Headers

<ParamField header="api-token" type="string" required />

## Body

<ParamField body="files" type="File[]" required>
  Non-empty array. Same shape as in [Create project](/api-reference/projects/create).
  `text` files are uploaded to S3 and stored as `document`.
</ParamField>

## Response

<ResponseField name="success" type="boolean" />

<ResponseField name="message" type="string" />

<ResponseField name="data.addedFiles" type="File[]">
  The files that were appended (with resolved S3 URLs for text types).
</ResponseField>

## Errors

| Status | Reason                           |
| ------ | -------------------------------- |
| `400`  | Project is not in `draft` status |
| `404`  | Project not found for this user  |

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.dabarai.com/v1/projects/6982139a1234abcd00009999" \
    -H "api-token: YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "files": [
        { "name": "extra.pdf", "type": "document", "url": "https://cdn.example.com/extra.pdf" }
      ]
    }'
  ```
</RequestExample>
