---
title: "Update all labels on a task."
method: POST
path: "/tasks/{taskID}/labels/bulk"
tags: ["labels"]
---

# Update all labels on a task.

`POST /tasks/{taskID}/labels/bulk`

Updates all labels on a task. Every label which is not passed but exists on the task will be deleted. Every label which does not exist on the task will be added. All labels which are passed and already exist on the task won't be touched.

## Path parameters

- `taskID` integer, required

## Request body

- ModelsLabelTaskBulk
  - `labels` ModelsLabel[] — All labels you want to update at once.
    - `created` string — A timestamp when this label was created. You cannot change this value.
    - `created_by` UserUser
      - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
      - `created` string — A timestamp when this task was created. You cannot change this value.
      - `email` string — The user's email address.
      - `id` integer — The unique, numeric id of this user.
      - `name` string — The full name of the user.
      - `updated` string — A timestamp when this task was last updated. You cannot change this value.
      - `username` string — The username of the user. Is always unique.
    - `description` string — The label description.
    - `hex_color` string — The color this label has in hex format.
    - `id` integer — The unique, numeric id of this label.
    - `title` string — The title of the label. You'll see this one on tasks associated with it.
    - `updated` string — A timestamp when this label was last updated. You cannot change this value.

## Response `201`

The updated labels object.

- ModelsLabelTaskBulk
  - `labels` ModelsLabel[] — All labels you want to update at once.
    - `created` string — A timestamp when this label was created. You cannot change this value.
    - `created_by` UserUser
      - `bot_owner_id` integer — BotOwnerID is the ID of the owning (human) user if this user is a bot. A non-zero value means this user is a bot and cannot authenticate via password.
      - `created` string — A timestamp when this task was created. You cannot change this value.
      - `email` string — The user's email address.
      - `id` integer — The unique, numeric id of this user.
      - `name` string — The full name of the user.
      - `updated` string — A timestamp when this task was last updated. You cannot change this value.
      - `username` string — The username of the user. Is always unique.
    - `description` string — The label description.
    - `hex_color` string — The color this label has in hex format.
    - `id` integer — The unique, numeric id of this label.
    - `title` string — The title of the label. You'll see this one on tasks associated with it.
    - `updated` string — A timestamp when this label was last updated. You cannot change this value.

## Other responses

- `400` — Invalid label object provided.
- `500` — Internal error

---

[API](https://skmtc.net/go-vikunja/apis/vikunja-api.md) · [All operations](https://skmtc.net/go-vikunja/apis/vikunja-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/go-vikunja/vikunja-api/versions/feb3f68bbdf1/schema)
