---
title: "Create document file storage upload URL"
method: POST
path: "/file-uploads/document-file-storage"
tags: ["File Upload Helpers"]
---

# Create document file storage upload URL

`POST /file-uploads/document-file-storage`

<small>Requires an API token with the **Document Manager** role.</small>

Generates a presigned URL for securely uploading a file to cloud storage. The uploaded file can then be associated with a  document via the [Store a PDF file in a document's file storage](/operations/v1.documents.document-file-storage.store) endpoint.

The returned URL expires after a limited time and should be used immediately for upload. Upload the file with a
POST request to the returned URL, sending the provided `fields` as form fields in the request body, followed by
the file contents in a `file` field.

The request accepts a `content_type` string matching one of the rows below, or any `image/*` MIME type.

| File type              | `content_type`                                                            |
|------------------------|---------------------------------------------------------------------------|
| CSV                    | application/csv, text/csv                                                 |
| MS Word (.doc)         | application/msword                                                        |
| MS Word (.docx)        | application/vnd.openxmlformats-officedocument.wordprocessingml.document   |
| PDF                    | application/pdf                                                           |
| RTF                    | application/rtf                                                           |
| Excel (.xls)           | application/vnd.ms-excel                                                  |
| Excel (.xlsx)          | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         |
| Outlook message (.msg) | application/vnd.ms-outlook                                                |
| EML                    | message/rfc822                                                            |
| PowerPoint (.ppt)      | application/vnd.ms-powerpoint                                             |
| PowerPoint (.pptx)     | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| XML                    | application/xml, text/xml                                                 |
| Plain text (.txt)      | text/plain                                                                |
| ZIP                    | application/zip, application/x-zip, application/x-zip-compressed          |
| Images                 | image/* (e.g. image/png, image/jpeg, image/gif)                           |

For a complete guide with examples, see [How to store a file in a document's file storage](/#how-to-store-a-file-in-a-documents-file-storage).

## Request body

- CreateDocumentFileStorageUploadUrlRequest
  - `content_type` string, required — The MIME type string of the file being uploaded.

## Response `201`

`SignedUploadUrlResource`

- object
  - `data` SignedUploadUrlResource, required
    - `uuid` string, required — UUID to be used when referring to the uploaded file in later requests
    - `url` string, required — The URL to upload the file contents to
    - `method` string, required — The HTTP method to use when uploading. Always POST.
    - `fields` object, required — Form fields to send in the body of the POST request, before the file contents
    - `expires_at` string, date-time, required — File must be uploaded before this time

## Other responses

- `401` — Unauthenticated
- `403` — Authorization error
- `422` — Validation error

---

[API](https://skmtc.dev/fynk/apis/fynk-api-reference.md) · [All operations](https://skmtc.dev/fynk/apis/fynk-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fynk/fynk-api-reference/revisions/9657a6757f59/schema)
