- Tasks
  - get Find all tasks
  - get Find all tasks by container
  - del Deletes a tasks by container
- Task
  - post Create new task
  - get Get task by id
  - put Update task by id
  - del Delete the task by id
- Task management
  - patch Change task status
  - patch Revert task
  - post Attach files to task
  - del Remove file from task
- Task List
  - get Find all task lists by container
  - post Create new task list
  - get Get task list by id
  - put Update task list by id
  - del Delete the task list by id

API docs by Redocly

# HumHub - Tasks API (1.0.0)

Download OpenAPI specification:

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub tasks module API reference.

## Tasks

## Find all tasks

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/tasks

### Response samples

- 200

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "pages": 8,
- "links":
  {
  - "self": "{endpoint_path}?page=1&per-page=10",
  - "next": "{endpoint_path}?page=2&per-page=10",
  - "last": "{endpoint_path}?page=8&per-page=10"
  },
- "results":
  [
  - {
    - "id": 6,
    - "title": "Space task by API",
    - "description": "Space task by API description",
    - "status": 1,
    - "start_datetime": "2019-02-27 10:00:00",
    - "end_datetime": "2019-02-28 17:59:00",
    - "scheduling": 1,
    - "all_day": 0,
    - "reminders":
      [
      - {
        - "id": 14,
        - "task_id": 6,
        - "reminder_mode": 3,
        - "start_reminder_sent": 0,
        - "end_reminder_sent": 0
        }
      ],
    - "max_users": null,
    - "color": null,
    - "task_list":
      {
      - "id": 9,
      - "name": "Task list name",
      - "contentcontainer_id": 2,
      - "parent_id": null,
      - "color": "#d1ad0e",
      - "settings":
        {
        - "hide_if_completed": 1,
        - "sort_order": 0
        }
      },
    - "cal_mode": 1,
    - "review": 1,
    - "created_at": "2019-03-05 15:35:02",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "content":
      {
      - "metadata":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "object_model": "humhub\\modules\\post\\models\\Post",
        - "object_id": 12,
        - "visibility": 1,
        - "state": 1,
        - "archived": true,
        - "hidden": true,
        - "pinned": false,
        - "locked_comments": false,
        - "scheduled_at": "2023-09-14 05:15:00",
        - "created_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "created_at": "2022-04-13 05:15:43",
        - "updated_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "updated_at": "2022-05-21 06:20:18",
        - "url": "http://localhost/p/humhub/master/content/perma?id=109",
        - "contentcontainer_id": 5,
        - "stream_channel": "default"
        },
      - "comments":
        {
        - "total": 55,
        - "latestComments":
          [
          - {
            - "id": 14,
            - "message": "Calvin Klein – Between love and madness lies obsession.",
            - "objectModel": "humhub\\modules\\post\\models\\Post",
            - "objectId": 123,
            - "createdBy":
              {
              - "id": 14,
              - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
              - "display_name": "John Doe",
              - "url": "http://localhost/p/humhub/master/u/j.doe/"
              },
            - "createdAt": "2018-08-09 14:22:03",
            - "commentsCount": 5,
            - "comments":
              [
              - { }
              ]
            }
          ]
        },
      - "likes":
        {
        - "total": 35
        },
      - "files":
        {
        - "id": 14,
        - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
        - "mime_type": "text/plain",
        - "size": 14353,
        - "file_name": "image.jpg",
        - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
        },
      - "topics":
        [
        - {
          - "id": 135,
          - "name": "News"
          }
        ]
      },
    - "percentage": 0,
    - "checklist":
      [
      - {
        - "id": 14,
        - "task_id": 6,
        - "title": "first item",
        - "description": "item description",
        - "completed": 0,
        - "sort_order": 0
        }
      ],
    - "assigned_users":
      [
      - {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        }
      ],
    - "responsible_users":
      [
      - {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        }
      ]
    }
  ]

}`

## Find all tasks by container

##### path Parameters

id required | integer ID of content container

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/tasks/container/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "pages": 8,
- "links":
  {
  - "self": "{endpoint_path}?page=1&per-page=10",
  - "next": "{endpoint_path}?page=2&per-page=10",
  - "last": "{endpoint_path}?page=8&per-page=10"
  },
- "results":
  [
  - {
    - "id": 6,
    - "title": "Space task by API",
    - "description": "Space task by API description",
    - "status": 1,
    - "start_datetime": "2019-02-27 10:00:00",
    - "end_datetime": "2019-02-28 17:59:00",
    - "scheduling": 1,
    - "all_day": 0,
    - "reminders":
      [
      - {
        - "id": 14,
        - "task_id": 6,
        - "reminder_mode": 3,
        - "start_reminder_sent": 0,
        - "end_reminder_sent": 0
        }
      ],
    - "max_users": null,
    - "color": null,
    - "task_list":
      {
      - "id": 9,
      - "name": "Task list name",
      - "contentcontainer_id": 2,
      - "parent_id": null,
      - "color": "#d1ad0e",
      - "settings":
        {
        - "hide_if_completed": 1,
        - "sort_order": 0
        }
      },
    - "cal_mode": 1,
    - "review": 1,
    - "created_at": "2019-03-05 15:35:02",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "content":
      {
      - "metadata":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "object_model": "humhub\\modules\\post\\models\\Post",
        - "object_id": 12,
        - "visibility": 1,
        - "state": 1,
        - "archived": true,
        - "hidden": true,
        - "pinned": false,
        - "locked_comments": false,
        - "scheduled_at": "2023-09-14 05:15:00",
        - "created_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "created_at": "2022-04-13 05:15:43",
        - "updated_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "updated_at": "2022-05-21 06:20:18",
        - "url": "http://localhost/p/humhub/master/content/perma?id=109",
        - "contentcontainer_id": 5,
        - "stream_channel": "default"
        },
      - "comments":
        {
        - "total": 55,
        - "latestComments":
          [
          - {
            - "id": 14,
            - "message": "Calvin Klein – Between love and madness lies obsession.",
            - "objectModel": "humhub\\modules\\post\\models\\Post",
            - "objectId": 123,
            - "createdBy":
              {
              - "id": 14,
              - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
              - "display_name": "John Doe",
              - "url": "http://localhost/p/humhub/master/u/j.doe/"
              },
            - "createdAt": "2018-08-09 14:22:03",
            - "commentsCount": 5,
            - "comments":
              [
              - { }
              ]
            }
          ]
        },
      - "likes":
        {
        - "total": 35
        },
      - "files":
        {
        - "id": 14,
        - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
        - "mime_type": "text/plain",
        - "size": 14353,
        - "file_name": "image.jpg",
        - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
        },
      - "topics":
        [
        - {
          - "id": 135,
          - "name": "News"
          }
        ]
      },
    - "percentage": 0,
    - "checklist":
      [
      - {
        - "id": 14,
        - "task_id": 6,
        - "title": "first item",
        - "description": "item description",
        - "completed": 0,
        - "sort_order": 0
        }
      ],
    - "assigned_users":
      [
      - {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        }
      ],
    - "responsible_users":
      [
      - {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        }
      ]
    }
  ]

}`

## Deletes a tasks by container

##### path Parameters

id required | integer The id of content container

### Responses

/api/v1/tasks/container/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Records successfully deleted!"

}`

## Task

## Create new task

##### path Parameters

id required | integer The id of content container

##### Request Body schema: application/json

Task information

required | object
required | object
| object (Content)

### Responses

/api/v1/tasks/container/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "Task":
  {
  - "title": "New task by api",
  - "description": "Api task description",
  - "task_list_id": 9,
  - "scheduling": 1,
  - "all_day": 0,
  - "selectedReminders":
    [
    - 1,
    - 4
    ],
  - "cal_mode": 1,
  - "assignedUsers":
    [
    - "ad82fbfa-9621-489f-993a-0cf6d8be5747",
    - "231acc8c-a8f5-4450-8b96-f670ffc1496b"
    ],
  - "responsibleUsers":
    [
    - "ad82fbfa-9621-489f-993a-0cf6d8be5747"
    ],
  - "review": 1
  },
- "TaskForm":
  {
  - "is_public": 1,
  - "start_date": "2019-03-23",
  - "start_time": "10:00",
  - "end_date": "2019-03-25",
  - "end_time": "20:30",
  - "timeZone": "America/Los_Angeles",
  - "newItems":
    [
    - "first item",
    - "second item"
    ]
  },
- "content":
  {
  - "metadata":
    {
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_at": "2022-04-13 05:15:43"
    },
  - "topics":
    [
    - {
      - "name": "News"
      }
    ]
  }

}`

### Response samples

- 200
- 403
- 404
- 500

Content type
application/json
`
{

- "id": 6,
- "title": "Space task by API",
- "description": "Space task by API description",
- "status": 1,
- "start_datetime": "2019-02-27 10:00:00",
- "end_datetime": "2019-02-28 17:59:00",
- "scheduling": 1,
- "all_day": 0,
- "reminders":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "reminder_mode": 3,
    - "start_reminder_sent": 0,
    - "end_reminder_sent": 0
    }
  ],
- "max_users": null,
- "color": null,
- "task_list":
  {
  - "id": 9,
  - "name": "Task list name",
  - "contentcontainer_id": 2,
  - "parent_id": null,
  - "color": "#d1ad0e",
  - "settings":
    {
    - "hide_if_completed": 1,
    - "sort_order": 0
    }
  },
- "cal_mode": 1,
- "review": 1,
- "created_at": "2019-03-05 15:35:02",
- "created_by":
  {
  - "id": 14,
  - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  - "display_name": "John Doe",
  - "url": "http://localhost/p/humhub/master/u/j.doe/"
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  },
- "percentage": 0,
- "checklist":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "title": "first item",
    - "description": "item description",
    - "completed": 0,
    - "sort_order": 0
    }
  ],
- "assigned_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ],
- "responsible_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ]

}`

## Get task by id

##### path Parameters

id required | integer The id of the task

### Responses

/api/v1/tasks/task/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "id": 6,
- "title": "Space task by API",
- "description": "Space task by API description",
- "status": 1,
- "start_datetime": "2019-02-27 10:00:00",
- "end_datetime": "2019-02-28 17:59:00",
- "scheduling": 1,
- "all_day": 0,
- "reminders":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "reminder_mode": 3,
    - "start_reminder_sent": 0,
    - "end_reminder_sent": 0
    }
  ],
- "max_users": null,
- "color": null,
- "task_list":
  {
  - "id": 9,
  - "name": "Task list name",
  - "contentcontainer_id": 2,
  - "parent_id": null,
  - "color": "#d1ad0e",
  - "settings":
    {
    - "hide_if_completed": 1,
    - "sort_order": 0
    }
  },
- "cal_mode": 1,
- "review": 1,
- "created_at": "2019-03-05 15:35:02",
- "created_by":
  {
  - "id": 14,
  - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  - "display_name": "John Doe",
  - "url": "http://localhost/p/humhub/master/u/j.doe/"
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  },
- "percentage": 0,
- "checklist":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "title": "first item",
    - "description": "item description",
    - "completed": 0,
    - "sort_order": 0
    }
  ],
- "assigned_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ],
- "responsible_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ]

}`

## Update task by id

##### path Parameters

id required | integer The id of the task

##### Request Body schema: application/json

Task information

required | object
required | object
| object (Content)

### Responses

/api/v1/tasks/task/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "Task":
  {
  - "title": "New task by api",
  - "description": "Api task description",
  - "task_list_id": 9,
  - "scheduling": 1,
  - "all_day": 0,
  - "selectedReminders":
    [
    - 1,
    - 4
    ],
  - "cal_mode": 1,
  - "assignedUsers":
    [
    - "ad82fbfa-9621-489f-993a-0cf6d8be5747",
    - "231acc8c-a8f5-4450-8b96-f670ffc1496b"
    ],
  - "responsibleUsers":
    [
    - "ad82fbfa-9621-489f-993a-0cf6d8be5747"
    ],
  - "review": 1
  },
- "TaskForm":
  {
  - "is_public": 1,
  - "start_date": "2019-03-23",
  - "start_time": "10:00",
  - "end_date": "2019-03-25",
  - "end_time": "20:30",
  - "timeZone": "America/Los_Angeles",
  - "newItems":
    [
    - "first item",
    - "second item"
    ]
  },
- "content":
  {
  - "metadata":
    {
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_at": "2022-04-13 05:15:43"
    },
  - "topics":
    [
    - {
      - "name": "News"
      }
    ]
  }

}`

### Response samples

- 200
- 403
- 404
- 500

Content type
application/json
`
{

- "id": 6,
- "title": "Space task by API",
- "description": "Space task by API description",
- "status": 1,
- "start_datetime": "2019-02-27 10:00:00",
- "end_datetime": "2019-02-28 17:59:00",
- "scheduling": 1,
- "all_day": 0,
- "reminders":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "reminder_mode": 3,
    - "start_reminder_sent": 0,
    - "end_reminder_sent": 0
    }
  ],
- "max_users": null,
- "color": null,
- "task_list":
  {
  - "id": 9,
  - "name": "Task list name",
  - "contentcontainer_id": 2,
  - "parent_id": null,
  - "color": "#d1ad0e",
  - "settings":
    {
    - "hide_if_completed": 1,
    - "sort_order": 0
    }
  },
- "cal_mode": 1,
- "review": 1,
- "created_at": "2019-03-05 15:35:02",
- "created_by":
  {
  - "id": 14,
  - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  - "display_name": "John Doe",
  - "url": "http://localhost/p/humhub/master/u/j.doe/"
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  },
- "percentage": 0,
- "checklist":
  [
  - {
    - "id": 14,
    - "task_id": 6,
    - "title": "first item",
    - "description": "item description",
    - "completed": 0,
    - "sort_order": 0
    }
  ],
- "assigned_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ],
- "responsible_users":
  [
  - {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    }
  ]

}`

## Delete the task by id

##### path Parameters

id required | integer The id of the task

### Responses

/api/v1/tasks/task/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Task successfully deleted!"

}`

## Task management

## Change task status

##### path Parameters

id required | integer The id of the task

##### Request Body schema: application/json
required

title | integer <int64> Enum: 1 2 3 5 Participant type: 1 - pending. 2 - in progress. 3 - pending review. 5 - completed.

### Responses

/api/v1/tasks/task/{id}/processed

### Request samples

- Payload

Content type
application/json
`
{

- "title": 2

}`

### Response samples

- 200
- 400
- 403
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Status successfully changed."

}`

## Revert task

##### path Parameters

id required | integer The id of the task

##### Request Body schema: application/json
required

title | integer <int64> Enum: 1 2 3 4 Participant type: 1 - pending. 2 - in progress. 3 - pending review. 4 - completed.

### Responses

/api/v1/tasks/task/{id}/revert

### Request samples

- Payload

Content type
application/json
`
{

- "title": 2

}`

### Response samples

- 200
- 400
- 403
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Task successfully reverted."

}`

## Attach files to task

##### path Parameters

id required | integer The id of the task

##### Request Body schema: multipart/form-data
required

files required | Array of file The files to upload.

### Responses

/api/v1/tasks/task/{id}/upload-files

### Response samples

- 200
- 400
- 404
- 500

Content type
application/json
`
{

- "code": 200,
- "message": "Files successfully uploaded."

}`

## Remove file from task

##### path Parameters

id required | integer The id of the task
fileId required | integer The id of file to remove.

### Responses

/api/v1/tasks/task/{id}/remove-file/{fileId}

### Response samples

- 200
- 403
- 404
- 500

Content type
application/json
`
{

- "code": 200,
- "message": "File successfully removed."

}`

## Task List

## Find all task lists by container

##### path Parameters

id required | integer ID of content container

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/tasks/lists/container/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "pages": 8,
- "links":
  {
  - "self": "{endpoint_path}?page=1&per-page=10",
  - "next": "{endpoint_path}?page=2&per-page=10",
  - "last": "{endpoint_path}?page=8&per-page=10"
  },
- "results":
  [
  - {
    - "id": 9,
    - "name": "Task list name",
    - "contentcontainer_id": 2,
    - "parent_id": null,
    - "color": "#d1ad0e",
    - "settings":
      {
      - "hide_if_completed": 1,
      - "sort_order": 0
      }
    }
  ]

}`

## Create new task list

##### path Parameters

id required | integer The id of content container

##### Request Body schema: application/json

Task list information

required | object
required | object

### Responses

/api/v1/tasks/lists/container/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "TaskList":
  {
  - "name": "New task list by api",
  - "color": "#6fdbe8"
  },
- "TaskListSettings":
  {
  - "hide_if_completed": 1
  }

}`

### Response samples

- 200
- 404
- 500

Content type
application/json
`
{

- "id": 9,
- "name": "Task list name",
- "contentcontainer_id": 2,
- "parent_id": null,
- "color": "#d1ad0e",
- "settings":
  {
  - "hide_if_completed": 1,
  - "sort_order": 0
  }

}`

## Get task list by id

##### path Parameters

id required | integer The id of the task list

### Responses

/api/v1/tasks/list/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "id": 9,
- "name": "Task list name",
- "contentcontainer_id": 2,
- "parent_id": null,
- "color": "#d1ad0e",
- "settings":
  {
  - "hide_if_completed": 1,
  - "sort_order": 0
  }

}`

## Update task list by id

##### path Parameters

id required | integer The id of the task list

##### Request Body schema: application/json

Task list information

required | object
required | object

### Responses

/api/v1/tasks/list/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "TaskList":
  {
  - "name": "New task list by api",
  - "color": "#6fdbe8"
  },
- "TaskListSettings":
  {
  - "hide_if_completed": 1
  }

}`

### Response samples

- 200
- 404
- 500

Content type
application/json
`
{

- "id": 9,
- "name": "Task list name",
- "contentcontainer_id": 2,
- "parent_id": null,
- "color": "#d1ad0e",
- "settings":
  {
  - "hide_if_completed": 1,
  - "sort_order": 0
  }

}`

## Delete the task list by id

##### path Parameters

id required | integer The id of the task list

### Responses

/api/v1/tasks/list/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Task list successfully deleted!"

}`