---
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`

## Request

- Base URL: `https://{your-bynder-domain}`
- URL: `https://{your-bynder-domain}/api/workflow-jobs/{id}/upload`
- Auth: none declared

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.dev/bynder/apis/workflow-jobs-api.md) - [All operations](https://skmtc.dev/bynder/apis/workflow-jobs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bynder/apis/workflow-jobs-api/revisions/759559874d39?raw)
