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

# Upload RFI documents

> Upload a file for a request-for-information question and get back the fileId you submit with submitRfi.

## Overview

Questions of type `MULTI_UPLOAD`, `BANK_LINK_OR_STATEMENT` and `ADDRESS_VERIFICATION_OR_DOCUMENT` are answered with files. Upload each file to this endpoint first, for the question it answers, then pass the returned `fileId` values to [submitRfi](https://docs.fluz.app/submit-rfi).

Uploading a file does not answer the question by itself. Nothing is saved on the RFI until you call `submitRfi`.

## Required scopes

| Property | Value |
| - | - |
| Endpoint | REST — `POST /api/v1/file-upload/rfi-document` |
| Authentication | OAuth Bearer Token. Basic auth is not accepted |
| Content-Type | `multipart/form-data` |
| Required Scopes | `MANAGE_RFI` |

The token must be the same customer's token you use to read the RFI. See [Who can answer an RFI](https://docs.fluz.app/rfi-overview#who-can-answer-an-rfi).

| Environment | URL |
| - | - |
| Staging | `POST https://transactional-graph.staging.fluzapp.com/api/v1/file-upload/rfi-document` |
| Live | `POST https://transactional-graph.fluzapp.com/api/v1/file-upload/rfi-document` |

## Parameters

Sent as `multipart/form-data` fields:

| Field | Type | Required | Description |
| - | - | - | - |
| `file` | `File` | Yes | One file. Maximum size 5 MB. See [Accepted file types](#accepted-file-types) |
| `rfiId` | `UUID` | Yes | The RFI the file belongs to |
| `questionId` | `String` | Yes | The question the file answers, from `RfiQuestion.questionId` |

Upload one file per call. For a question that takes several files, call the endpoint once per file and keep every `fileId`.

### Accepted file types

The type is detected from the file's contents, not from its name or the `Content-Type` you send.

| Question type | Accepted |
| - | - |
| `MULTI_UPLOAD` | PDF, PNG, JPEG, GIF, WebP, CSV, TXT, DOC, DOCX, XLS, XLSX |
| `BANK_LINK_OR_STATEMENT` | PDF, PNG, JPEG, GIF, WebP |
| `ADDRESS_VERIFICATION_OR_DOCUMENT` | PDF, PNG, JPEG, GIF, WebP |

## cURL Example

```bash theme={null}
curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/file-upload/rfi-document \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -F "file=@/path/to/articles-of-organization.pdf" \
  -F "rfiId=7c1e2a90-4b3d-4f6e-9a18-3d5b2c7e8f01" \
  -F "questionId=q_formation"
```

## Response details

### Success — `200 OK`

| Field | Type | Description |
| - | - | - |
| `fileId` | `UUID` | Pass this to `submitRfi` in the question's answer |
| `fileName` | `String` | The original name of the uploaded file |

```json theme={null}
{
  "fileId": "b52f0e4a-1c7d-4a9b-8e36-0f2d9c4a7b15",
  "fileName": "articles-of-organization.pdf"
}
```

Then answer the question with the file IDs:

```json theme={null}
{
  "questionId": "q_formation",
  "value": [
    { "fileId": "b52f0e4a-1c7d-4a9b-8e36-0f2d9c4a7b15" }
  ]
}
```

A `fileId` can be used only for the question it was uploaded for, and only once.

## Error Codes

| HTTP | Code | Description | How to resolve |
| - | - | - | - |
| `401` | `AUTH-0008` | No Bearer user token, or Basic auth was used | Call with the customer's Bearer token |
| `403` | `AUTH-0031` | The token is missing `MANAGE_RFI` | Add the scope and re-mint the token |
| `400` | `ARG-0002` | No `file` was included | Send the file as a `multipart/form-data` field named `file` |
| `400` | `ARG-0001` | `rfiId` is not a UUID, `questionId` is missing or too long, or the file type is not accepted for this question | Check the fields and the [accepted file types](#accepted-file-types) |
| `403` | `G-0003` | The RFI does not exist, or it is not addressed to the token's user and account | Use the token you read the RFI with |
| `400` | `UNKNOWN_QUESTION` | The RFI has no answerable question with this `questionId` | Use a `questionId` from the RFI's current questions |
| `400` | `NOT_A_FILE_QUESTION` | The question is not answered with files | Answer it in `submitRfi` with the value its type expects |
| `400` | `ALREADY_SUBMITTED` | The question already has a saved answer — including a bank link saved with `completeRfiPlaidLink` | Nothing to upload. Saved answers cannot be changed |
| `409` | `RFI_NOT_OPEN` | The RFI is not waiting for answers | Read the RFI to see its status |
| `409` | `RFI_EXPIRED` | The RFI has expired | Direct the customer to support |

Files over 5 MB are rejected before they are processed. Check the size in your UI before uploading.

## Notes

* Upload right before submitting, so the files and the answers belong to the same session.
* Files are stored against the RFI as soon as they are uploaded, but they are not part of the customer's answer until `submitRfi` includes their `fileId`.
* Name files clearly (for example `operating-agreement.pdf`). It is not required, but it speeds up review.

## Related pages

> [card] [Submit an RFI](https://docs.fluz.app/submit-rfi)
>
> Where the returned `fileId` values are submitted.

> [card] [Answer with a bank link](https://docs.fluz.app/complete-rfi-plaid-link)
>
> For bank-statement and proof-of-address questions, without a file.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.