---
title: "Tag a task"
method: POST
path: "/task/tag"
tags: ["task"]
---

# Tag a task

`POST /task/tag`

Tags a task.

## Response `200`

The id of the tagged task

- object
  - `task_tag` InlineResponse2006TaskTag
    - `id` string — ID of the tagged task

## Other responses

- `412` — Precondition failed. An error code and message are returned. 470 - In order to add a tag, please upload the entity id (either data_id, task_id, flow_id, run_id) and tag (the name of the tag). 471 - Entity not found. The provided entity_id {data_id, task_id, flow_id, run_id} does not correspond to an existing entity. 472 - Entity already tagged by this tag. The entity {dataset, task, flow, run} already had this tag. 473 - Something went wrong inserting the tag. Please contact OpenML Team. 474 - Internal error tagging the entity. Please contact OpenML Team.

## Changes

- **2019-02-22** `8e2f718635ef` — 6 info
  - added the non-success response with the status `412`
  - removed the non-success response with the status `470`
  - removed the non-success response with the status `471`
  - removed the non-success response with the status `472`
  - …2 more
- **2018-01-17** `2209d99ea36e` — 6 info
  - added the non-success response with the status `470`
  - added the non-success response with the status `471`
  - added the non-success response with the status `472`
  - added the non-success response with the status `473`
  - …2 more

[Change history](https://skmtc.dev/openml/apis/openml-api/changes/task/tag/post.md)

---

[API](https://skmtc.dev/openml/apis/openml-api.md) · [All operations](https://skmtc.dev/openml/apis/openml-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openml/openml-api/revisions/263d3d6ee586/schema)
