# Upload file(s) to a project

`POST /api/project/{projectId}/file`

URL: https://repsona.com/api/post-project-projectid-file

Uploads one or more files tied to a project. Send multipart/form-data with one or more parts named `file`; each part's filename is kept as the file name (max 100 MB per file). Requires project membership.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | path | integer | required | ID of the project to attach the uploaded files to. You must be a member of it. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `file` | body | file | required | The file to upload. Its filename is kept as the file name. Repeat the part to upload several files. |

## Request

```sh
curl -X POST "https://<space>.repsona.com/api/project/{projectId}/file" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -F "file=@screenshot.png"
```

## Responses

- 200: Uploaded files
- 400: Invalid multipart payload or quota exceeded
- 401: Authentication is required
- 403: Not a project member
- 404: Project not found

## Example response

```json
{
  "files": [
    {
      "id": 61,
      "hash": "f115d239-d980-4b0a-b1a8-8facf9ced74a",
      "size": 15,
      "type": "application/pdf",
      "filename": "meeting-notes.pdf"
    }
  ]
}
```
