---
title: "Upload a file to a workflow job"
url: "https://earlyaccess.developers.bynder.com/apis/workflow-jobs-api-1/versions/fe891cd9-8e8e-454e-83d7-5e79bbd56714/paths/api-workflow-jobs-id--upload/post"
---

> Full API specification: https://earlyaccess.developers.bynder.com/apis/workflow-jobs-api-1/versions/fe891cd9-8e8e-454e-83d7-5e79bbd56714.md

# 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) - The id of a Job.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - Successful response

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Workflow Jobs API
  version: 1.0.0
servers:
  - url: https://{your-bynder-domain}
paths:
  /api/workflow-jobs/{id}/upload:
    post:
      description: >
        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.
      parameters:
        - description: The id of a Job.
          in: path
          name: id
          required: true
          schema:
            example: 00000000-0000-0000-0000-000000000000
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                assetId:
                  description: Id of the parent asset if this file is a new version of an asset
                  example: 00000000-0000-0000-0000-000000000002
                  type: string
                fileId:
                  description: Id of the file to be saved to the job (to be retrieved from Upload
                    file endpoint)
                  example: 00000000-0000-0000-0000-000000000001
                  type: string
                fileSize:
                  description: Size of the file in bytes
                  example: 50000
                  type: number
                name:
                  description: Value to be used as filename
                  example: example-name.jpg
                  type: string
              type: object
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                properties:
                  mediaId:
                    description: Media ID of the uploaded file
                    example: "00000000000000000000000000000000"
                    type: string
                type: object
          description: Successful response
      summary: Upload a file to a workflow job
      tags:
        - File upload
```
