---
title: "Get Async Task Status"
method: GET
path: "/api/async/{task_id}"
tags: ["Misc"]
---

# Get Async Task Status

`GET /api/async/{task_id}`

Poll the status of an asynchronous task. Returns the current state of the task and, when complete, the result or error. This endpoint is generic — it works for any task enqueued by an asynchronous Sefaria API (e.g. `POST /api/find-refs`).

**States:**
- `PENDING` — The task has not yet started (or the task ID is unknown).
- `STARTED` — The task is currently being executed.
- `RETRY` — The task failed and is being retried.
- `SUCCESS` — The task completed successfully. The `result` field contains the task output; its shape depends on which API enqueued the task.
- `FAILURE` — The task failed permanently. The `error` field contains the error message.

**HTTP status codes:**
- `202` — Task is still running (state is `PENDING`, `STARTED`, or `RETRY`).
- `200` — Task completed successfully.
- `500` — Task failed permanently.

## Path parameters

- `task_id` string, required

## Response `200`

Task completed successfully. The shape of the `result` field depends on which API enqueued the task. For tasks started by `POST /api/find-refs`, `result` is a `FindRefsAPIResponse` object.

- AsyncTaskSuccess — Response returned when a task has completed successfully. The shape of `result` depends on which API enqueued the task.
  - `task_id` string, required — The task identifier.
  - `state` 'SUCCESS', required — Always `SUCCESS` for this response.
  - `ready` boolean, required — Always `true` when the task has completed.
  - `result` object, required — The task output. Its shape depends on which API enqueued the task. For `POST /api/find-refs` tasks, this is a `FindRefsAPIResponse` object.

## Other responses

- `202` — Task is still in progress (`PENDING`, `STARTED`, or `RETRY`).
- `500` — Task failed permanently. The `error` field contains the error message.

---

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