Tasks > TaskFile

Creates a Task file

Changed on

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
    • OAuth 2
      Authorization code: https://id.factorialhr.com/oauth/authorize
      Token URL: https://id.factorialhr.com/api/oauth/token scopes: tasks
    • or API key in header x-api-key

Request body multipart/form-data

task_idstring required

identifier of the task

filestring binary required

file to attach to the task

Example request

{
  "task_id": "1",
  "file": "expenses.png"
}

Response

CREATED

idstring required

identifier of the file.

task_idstring required

identifier of the task.

filenamestring required

name of the file.

content_typestring

content type of the file.

pathstring required

path of the file, for downloading the file you need to concat api_url/path.

created_atstring required

creation date of the file.

Example response

{
  "id": "1",
  "task_id": "1",
  "filename": "expenses.png",
  "content_type": "image/png",
  "path": "/tasks/tasks_files/405",
  "created_at": "2024-10-06"
}

Changes