# Attach a file to a note

`PUT /api/note/{noteId}/files/{fileId}`

URL: https://repsona.com/api/put-note-noteid-files-fileid

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `noteId` | path | integer | required | ID of the note. |
| `fileId` | path | integer | required | ID of the file, returned as `id` when the file was uploaded. |

## Request

```sh
curl -X PUT "https://<space>.repsona.com/api/note/{noteId}/files/{fileId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Responses

- 200: Attached files
- 401: Authentication is required
- 403: Not a project member
- 404: Note not found

## Example response

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