---
title: "Creates a Task file"
method: POST
path: "/api/2026-10-01/resources/tasks/task_files"
tags: ["Tasks > TaskFile"]
---

# Creates a Task file

`POST /api/2026-10-01/resources/tasks/task_files`

## Request

- Base URL: `https://api.factorialhr.com`
- URL: `https://api.factorialhr.com/api/2026-10-01/resources/tasks/task_files`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://id.factorialhr.com/oauth/authorize`
    - Token URL: `https://id.factorialhr.com/api/oauth/token` scopes: `tasks`
  - API key in header `x-api-key`

Creates a Task file

## Request body `multipart/form-data`

- object
  - `task_id` string, required: identifier of the task
  - `file` string, binary, required: file to attach to the task

## Response `201`

CREATED

- TasksTaskFile
  - `id` string, required: identifier of the file.
  - `task_id` string, required: identifier of the task.
  - `filename` string, required: name of the file.
  - `content_type` string: content type of the file.
  - `path` string, required: path of the file, for downloading the file you need to concat api_url/path.
  - `created_at` string, required: creation date of the file.

## Changes

- **2026-11-03** `83ac9aa1de50`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/factorialhr/apis/factorial-api/changes/api/2026-10-01/resources/tasks/task_files/post.md)

---

[API](https://skmtc.dev/factorialhr/apis/factorial-api.md) - [All operations](https://skmtc.dev/factorialhr/apis/factorial-api/llms.txt) - [OpenAPI document](https://skmtc.dev/factorialhr/apis/factorial-api/revisions/83ac9aa1de50?raw)
