## How file uploading works
In Brokermint, we allow users to upload files through our API using the simple logic: request the upload link and then upload the file.
> Due to our constant commitment to customer security, we allow uploading files like PDF, JPG, DOCX and so on. [See the full list of allowed formats here.](https://brokermintsupport.zendesk.com/hc/en-us/articles/8046204278548-Security-Measures-File-Upload-at-Brokermint)
Depending on the module, the request’s URI and set of parameters will vary, but the overall logic will remain the same and include 2 simple steps:
**STEP 1: Get the upload document link**
Use the **"Request upload URL"** endpoint to generate the new upload document link. Keep in mind that the link will expire in 5 minutes since the creation.
Request example:
```
POST /api/v1/..../request_upload_url
```
Response example:
```json
{
"upload_url": "http://example.com/upload_document?data=JhsDcf_wey%a27gasu..."
}
```
**STEP 2: Upload the document**
Use this link along with the ``"file"`` parameter to upload your document to the system. As a result, you will receive a `200 OK` response with the uploaded document information as a JSON.
Request example:
```
POST http://example.com/upload_document?data=JhsDcf_wey%a27gasu...
Content-Type: multipart/form-data
file: <path_to_local_file>/sample.pdf
```
Response example:
```json
{
"id": 82,
"name": "sample.pdf",
"task_id": null,
"content_type": "application/pdf",
"has_package": false,
"review_status": null,
"upload_status": "complete",
"status": "ready",
"url": "http://link.to.file/sample.pdf"
}
```