> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manka.tz/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Run your first Manka analysis in under five minutes.

This walkthrough submits a PDF for asynchronous analysis and retrieves the result.

## Prerequisites

* A Manka API token ([how to generate one](/authentication))
* A bank statement PDF
* `curl` (or any HTTP client)

## 1. Confirm the API is up

<CodeGroup>
  ```bash cURL theme={null}
  curl https://gateway.manka.tz/v1/api/health-check
  ```
</CodeGroup>

You should see:

```json theme={null}
{ "status": "ok", "latency": "12ms" }
```

## 2. Submit a statement

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://gateway.manka.tz/v1/api/analysis \
    -H "Authorization: Bearer $MANKA_API_TOKEN" \
    -F "file=@statement.pdf"
  ```
</CodeGroup>

```json Response theme={null}
{
  "status": "processing",
  "task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718"
}
```

Save the `task_id` — you'll need it for polling.

## 3. Poll for results

<CodeGroup>
  ```bash cURL theme={null}
  curl https://gateway.manka.tz/v1/api/analysis/3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718 \
    -H "Authorization: Bearer $MANKA_API_TOKEN"
  ```
</CodeGroup>

The response moves through three terminal states:

<Tabs>
  <Tab title="Processing">
    ```json theme={null}
    {
      "status": "processing",
      "task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718"
    }
    ```
  </Tab>

  <Tab title="Completed">
    ```json theme={null}
    {
      "status": "completed",
      "task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718",
      "result": { "...": "..." }
    }
    ```
  </Tab>

  <Tab title="Failed">
    ```json theme={null}
    {
      "status": "failed",
      "task_id": "3f7a1c2e-8b4d-4e9f-a1b2-c3d4e5f60718",
      "error": "Unable to process this PDF"
    }
    ```
  </Tab>
</Tabs>

<Tip>
  Skip polling entirely by passing a `callback_url` when submitting — Manka will `POST` the final payload to that URL. See [Callback payload](/api-reference/analysis/callback).
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="Asynchronous Analysis" icon="chart-line" href="/api-reference/analysis/submit">
    Full reference for `/analysis` and polling.
  </Card>

  <Card title="Synchronous Transactions" icon="arrow-right-arrow-left" href="/api-reference/transactions/extract">
    Get the raw transaction list in a single request.
  </Card>

  <Card title="Combined Analysis" icon="file-invoice-dollar" href="/api-reference/analysis-combined">
    Analyse two or more statements together.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/errors">
    The error response shape and common status codes.
  </Card>
</CardGroup>
