---
title: "Upload task"
method: POST
path: "/task"
tags: ["task"]
---

# Upload task

`POST /task`

Uploads a task. Upon success, it returns the task id.

## Query parameters

- `api_key` string, required

## Response `200`

Id of the uploaded task

- object
  - `upload_task` InlineResponse2005UploadTask
    - `id` string — ID of the uploaded task, a positive integer

## Other responses

- `412` — Precondition failed. An error code and message are returned. 530 - Description file not present. Please upload the task description. 531 - Internal error. Please contact api support team 532 - Problem validating uploaded description file. The XML description format does not meet the standards 533 - Task already exists. 534 - Error creating the task.

## Changes

> 14 revisions in range; 1 could not be searched.

- **2019-02-22** `8e2f718635ef` — 6 info
  - added the non-success response with the status `412`
  - removed the non-success response with the status `530`
  - removed the non-success response with the status `531`
  - removed the non-success response with the status `532`
  - …2 more
- **2018-01-17** `2209d99ea36e` — 6 info
  - added the non-success response with the status `530`
  - added the non-success response with the status `531`
  - added the non-success response with the status `532`
  - added the non-success response with the status `533`
  - …2 more

[Change history](https://skmtc.dev/openml/apis/openml-api/changes/task/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)
