# Get task status

> The status and nothing else — the endpoint to poll on an interval. It also accepts a public access token, so browser code can follow a task without holding an API key.

The endpoint to poll. It returns the status and nothing else, from a cache,
and it accepts the task's public access token, so browser code can follow a
task without an API key.

[Poll for results](https://mynth.io/docs/guides/poll-for-results.md) has a loop with backoff. A
[webhook](https://mynth.io/docs/concepts/webhooks.md) avoids polling entirely.

`GET /tasks/{id}/status`

**Auth:** API key or Public access token

## Path parameters

- `id` (required, string) — The task to poll. Example `"tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"`.

## Response

### 200 — Task status returned

- `data` (required, object)
  - `status` (required, string) — One of: `"completed"`, `"failed"`, `"pending"`.

```json
{
  "data": {
    "status": "completed"
  }
}
```

## Request samples

### cURL

```bash
curl https://api.mynth.io/tasks/tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP/status \
  -H "Authorization: Bearer $MYNTH_API_KEY"
```

### JavaScript

```ts
const response = await fetch("https://api.mynth.io/tasks/tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP/status", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MYNTH_API_KEY}`,
  },
});

const { data } = await response.json();
```

The full schema for this endpoint is in the [OpenAPI document](https://api.mynth.io/openapi.json).
