---
title: "Retrieve task"
method: GET
path: "/api/v1/tasks/{taskID}"
tags: ["Task"]
---

# Retrieve task

`GET /api/v1/tasks/{taskID}`

Get a task object.

**Response Behavior:**
- If the task has status `running` or `failed`, the endpoint returns status `200` with the task object.
- If the task has status `succeeded` and `no_redirect` parameter is not set or is `false`, the endpoint redirects with status `303` to the newly created object (URL provided in `result_url`).
- If the task has status `succeeded` and `no_redirect=true` is passed, the endpoint returns the task object with status `200`.

## Path parameters

- `taskID` integer, required

## Query parameters

- `no_redirect` boolean

## Response `200`

OK - Returns the task object. This response is returned when:
- Task status is `running` or `failed`
- Task status is `succeeded` and `no_redirect=true` parameter was passed

- Task
  - `id` integer, required — Task object ID.
  - `url` string, uri, required — Task object URL.
  - `type` 'documents_download' | 'upload_created' | 'email_imported', required
  - `status` 'running' | 'succeeded' | 'failed', required
  - `expires_at` string, date-time, required — Timestamp of a guaranteed availability of the task object. Expired tasks are being deleted periodically.
  - `detail` string, nullable, required — Detailed message on the status of the task. For failed tasks, error id is included in the message and can be used in communication with Rossum support for further investigation.
  - `content` object, required — Detailed information related to tasks. Content structure varies by task type: - For `documents_download`: contains `file_name` (string) - File name of the archive to be downloaded. - For `upload_created`: contains `upload` (url) - URL of the object representing the upload.
  - `code` string, nullable, required — Error code.
  - `result_url` string, uri, nullable, required — Succeeded status resulting redirect URL.

## Other responses

- `303` — See Other - Redirects to the newly created object when task status is `succeeded` and `no_redirect` parameter is not set. The URL of the created object is provided in the `Location` header and matches the `result_url` field from the task object.
- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

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