---
title: Upload task request file
slug: upload-task-request-file
docTags: 
createdAt: 2026-10-08T08:29:29.588Z
---

{
  "id": "hMQWukuBFALRFYJJJ7U1e",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://dev1.frontu.com//client/api/v2/files/task_request/upload",
    "servers": [
      {
        "url": "https://dev1.frontu.com//client/api/v2/files/task_request/upload"
      }
    ],
    "name": "Upload task request file",
    "description": "<p>This endpoint allows to upload a file for a task request using multipart/form-data.</p>",
    "contentType": "multipart/form-data",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "Example",
            "Example with custom values"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "file",
          "kind": "required",
          "type": "string<binary>",
          "description": "",
          "format": "binary"
        },
        {
          "name": "taskRequest",
          "kind": "required",
          "type": "string",
          "description": ""
        }
      ],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Value: Bearer {access_token}</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returned when successful",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "version",
                "kind": "optional",
                "type": "integer",
                "description": ""
              },
              {
                "name": "originalName",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "path",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "checksum",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "contentLength",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "task",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "taskRequest",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "guid",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "updated",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Entity not found",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "kUDBBBRzCO6Jdf2JQgVYt",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://dev1.frontu.com//client/api/v2/files/task_request/upload \\\n     --header 'accept: application/json' \\\n     --header 'content-type: multipart/form-data' \\\n     --form 'file=@\"/path/to/file\"' \\\n     --form 'taskRequest=\"string\"'"
        },
        {
          "id": "Ybpc-LoxQwrG8q_kP5hhi",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"multipart/form-data\");\n\nvar formdata = new FormData();\nformdata.append(\"file\", fileInput.files[0], \"file\");\nformdata.append(\"taskRequest\", \"string\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: formdata,\n   redirect: 'follow'\n};\n\nfetch(\"https://dev1.frontu.com//client/api/v2/files/task_request/upload\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "MpXouxwxlDtbhuVm7mmU_",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://dev1.frontu.com//client/api/v2/files/task_request/upload\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"multipart/form-data\"\nform_data = [['file', File.open('/path/to/file')],['taskRequest', File.open('undefined')]]\nrequest.set_form form_data, 'multipart/form-data'\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "V9p97TkKJmlg1sLHbmI6M",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://dev1.frontu.com//client/api/v2/files/task_request/upload\"\n\npayload = {}\nfiles=[\n   ('file',('file',open('/path/to/file','rb'),'application/octet-stream'))\n]\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'multipart/form-data'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload, files=files)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "kUDBBBRzCO6Jdf2JQgVYt"
    },
    "results": {
      "languages": [
        {
          "id": "d-8EljQdEFHquyk2BW1kj",
          "language": "200",
          "code": "// Returned when successful\n{\n  \"version\": 0,\n  \"originalName\": \"\",\n  \"path\": \"\",\n  \"checksum\": \"\",\n  \"contentLength\": \"\",\n  \"task\": \"\",\n  \"taskRequest\": \"\",\n  \"guid\": \"\",\n  \"created\": \"\",\n  \"updated\": \"\"\n}"
        },
        {
          "id": "bg37JB10ZJz_T-FFQ8zIp",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "GmFhggHaCW4izLBbHebPo",
          "language": "404",
          "code": "// Entity not found\n"
        }
      ],
      "selectedLanguageId": "d-8EljQdEFHquyk2BW1kj"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}