---
title: "Upload a file to a workflow job"
method: POST
path: "/api/workflow-jobs/{id}/upload"
tags: ["File upload"]
---

# Upload a file to a workflow job

`POST /api/workflow-jobs/{id}/upload`

To upload a file to a workflow job it needs to be uploaded via the Upload file endpoint for modern stack. After completing the various steps described in the Upload file endpoint, the `fileId` retrieved from those steps is needed in this request to reference the file to the job. This file will be attached to the job only.
**Warning:** Requires the **JOBEDIT** security role.
**Warning:** Is only available for Files-Service portals.

## Path parameters

- `id` string, required

## Request body

- object
  - `fileId` string — Id of the file to be saved to the job (to be retrieved from Upload file endpoint)
  - `name` string — Value to be used as filename
  - `fileSize` number — Size of the file in bytes
  - `assetId` string — Id of the parent asset if this file is a new version of an asset

## Response `200`

Successful response

- object
  - `mediaId` string — Media ID of the uploaded file

---

[API](https://skmtc.net/bynder/apis/oauth-2-0.md) · [All operations](https://skmtc.net/bynder/apis/oauth-2-0/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bynder/oauth-2-0/revisions/bb9efc864ce1/schema)
