---
title: "Create a file upload"
method: POST
path: "/file-uploads"
tags: ["File Uploads"]
---

# Create a file upload

`POST /file-uploads`

Returns a single-use upload URL and a `fileUploadId`. Upload the file's bytes to `uploadUrl` with an HTTP `PUT` (sending the same `Content-Type` you declared), then attach the upload to a target by passing the `fileUploadId` to one of the `/upload` endpoints. Lets you upload large files without sending them through the API.

## Request body

- CreateFileUploadRequest
  - `filename` string, required — The original file name, including its extension.
  - `contentType` string, required — The MIME type of the file (e.g. `application/pdf`). You must send this exact value as the `Content-Type` header when uploading to `uploadUrl`.
  - `sizeBytes` integer, required — The size of the file in bytes.

## Response `201`

- PublicApiFileUploadResponse
  - `data` object, required — The resource returned by this request.
    - `fileUploadId` string, required — Opaque, single-use handle for this upload. Pass it to an `/upload` endpoint to attach the uploaded file to a target. Treat it as an opaque token.
    - `uploadUrl` string, required — The URL to upload the file's bytes to, with a single `PUT` request.
    - `uploadMethod` string, required — HTTP method to use when uploading to `uploadUrl`. Always `PUT`.
    - `uploadExpiresDate` string, date-time, required — When `uploadUrl` expires. ISO-8601 UTC. Upload the bytes before this time.
  - `links` object[] — Pagination links. When the result has more pages, look for an entry with `name: "next"` — its `href` is the URL to fetch the next page. Absence of `next` means there are no more pages. For single-resource responses this array is typically empty.
    - `name` string, required — Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
    - `href` string, required — URL of the linked resource.
    - `rel` 'Approval Task' | 'Approvals' | 'Assignees' | 'Comment' | 'Data Set Records' | 'Data Sets' | 'Form Field Values' | 'Subject Task' | 'Task' | 'Tasks' | 'Users' | 'Webhook' | 'Workflow' | 'Workflow Run' — Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
    - `type` 'Api' | 'App', required — Whether this link targets an API endpoint or a Process Street app URL. `Api` — a callable API endpoint you can fetch directly. `App` — a browser-facing URL in the Process Street UI.

## Other responses

- `400` — Invalid value for: body
- `default`

---

[API](https://skmtc.net/process/apis/process-street-public-api.md) · [All operations](https://skmtc.net/process/apis/process-street-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/process/process-street-public-api/revisions/6199a9464227/schema)
