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

# List one visitor's own widget threads

> The conversation threads belonging to the visitor token you present, and no others. One visitor cannot enumerate another's threads by changing an identifier.

Call this from the visitor's browser. It takes the embed's **public widget key** in `X-ARUKZ-Widget-Key`, and the browser's `Origin` must be allowed by both the deployment's `allowed_origins` and the platform-wide widget allowlist. See [Website widget](/channels/widget).

Only threads started with the visitor token you send are returned. Without an `X-ARUKZ-Visitor-Token` header the response is an empty list, never other visitors' threads. A visitor token belongs to one thread, so in practice this returns at most the one conversation that token unlocks.

The server reads the embed's `limit` most recent threads, across all visitors, and then keeps only the ones your token unlocks. An older thread can therefore be missing from the result even though its token is valid; fetch it directly with [Get a widget conversation](/api-reference/widget/get-thread) instead. This endpoint returns a single page: `next_cursor` is always `null` and `has_more` is always `false`.

When a request is refused, the response carries no `Access-Control-Allow-Origin` header, so in a cross-origin browser request `fetch` rejects with a network error instead of exposing the error body.

<ParamField header="X-ARUKZ-Widget-Key" type="string" required>
  The deployment's public widget key, `arukz_wk_…`.
</ParamField>

<ParamField header="Origin" type="string" required>
  Set by the browser. It must exactly match an origin allowed for this deployment. When you call
  from outside a browser, set it yourself.
</ParamField>

<ParamField header="X-ARUKZ-Visitor-Token" type="string">
  The visitor token returned when a thread was started. Without it the list is empty.
</ParamField>

<ParamField query="include_archived" type="boolean" default="false">
  Include archived threads. Accepts `true`, `false`, `1` or `0`, in any letter case. Any other value
  returns `400 validation_error`.
</ParamField>

<ParamField query="limit" type="integer" default="20">
  How many of the embed's most recent threads to consider, from 1 to 100.
</ParamField>

## Response

<ResponseField name="data" type="object[]" required>
  The threads your token unlocks, newest first.

  <Expandable title="properties">
    <ResponseField name="id" type="string" required>The conversation's ID (UUID).</ResponseField>
    <ResponseField name="assistant_id" type="string" required>The assistant the deployment embeds.</ResponseField>
    <ResponseField name="title" type="string" required>The thread's title.</ResponseField>
    <ResponseField name="status" type="string" required>`active` or `archived`.</ResponseField>
    <ResponseField name="turn_state" type="string" required>`idle` when ready for a question, or `awaiting_answer` while an answer is being generated.</ResponseField>
    <ResponseField name="message_count" type="integer" required>Number of messages, questions and answers together.</ResponseField>
    <ResponseField name="created_at" type="string" required>ISO 8601 in UTC.</ResponseField>
    <ResponseField name="updated_at" type="string" required>ISO 8601 in UTC.</ResponseField>
    <ResponseField name="owner" type="object" required>`{"type": "widget", "id": <deployment ID>}`.</ResponseField>
    <ResponseField name="metadata" type="object" required>The metadata sent when the thread was started.</ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="next_cursor" type="string | null" required>
  Always `null`.
</ResponseField>

<ResponseField name="has_more" type="boolean" required>
  Always `false`.
</ResponseField>

<RequestExample>
  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  // Runs on your website.
  const MITHUNAI_API = `${MITHUNAI_URL}/arukz/api/v1`
  const WIDGET_KEY = 'arukz_wk_8d0f5a2e-3c41-4b7a-9e6d-1f2a3b4c5d6e'

  const response = await fetch(`${MITHUNAI_API}/widget/conversations`, {
    headers: {
      'X-ARUKZ-Widget-Key': WIDGET_KEY,
      'X-ARUKZ-Visitor-Token': sessionStorage.getItem('mithunai.visitorToken'),
    },
  })
  const { data } = await response.json()
  console.log(data)
  ```

  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --request GET "$MITHUNAI_URL/arukz/api/v1/widget/conversations?limit=20" \
    --header "X-ARUKZ-Widget-Key: arukz_wk_8d0f5a2e-3c41-4b7a-9e6d-1f2a3b4c5d6e" \
    --header "X-ARUKZ-Visitor-Token: $VISITOR_TOKEN" \
    --header "Origin: https://docs.example.com"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": [
      {
        "id": "0e6a9b52-7d3f-4c18-a2e5-9b8c7d6e5f4a",
        "assistant_id": "5b1e9c2a-7d4f-4e3b-9a61-0c8f2d7e4a13",
        "title": "How do I raise my rate limit?",
        "status": "active",
        "turn_state": "idle",
        "message_count": 2,
        "created_at": "2026-09-24T10:02:17.559310+00:00",
        "updated_at": "2026-09-24T10:02:24.910447+00:00",
        "owner": { "type": "widget", "id": "8d0f5a2e-3c41-4b7a-9e6d-1f2a3b4c5d6e" },
        "metadata": { "page": "/guides/rate-limits" }
      }
    ],
    "next_cursor": null,
    "has_more": false
  }
  ```

  ```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "validation_error", "message": "'limit' must be between 1 and 100." }
  ```

  ```json 401 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authentication_error", "message": "Authentication is required." }
  ```

  ```json 403 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authorization_error", "message": "This widget may not be embedded from that origin." }
  ```
</ResponseExample>
