---
title: "How far the initial memory sweep has got"
method: GET
path: "/api/v1/contacts/{id}/import-progress"
---

# How far the initial memory sweep has got

`GET /api/v1/contacts/{id}/import-progress`

## Request

- Base URL: `https://memchats.com`
- URL: `https://memchats.com/api/v1/contacts/{id}/import-progress`
- Auth: HTTP bearer

Poll while an import is in flight. 204 means nothing is running, which is different from 0%.

## Path parameters

- `id` integer, required

## Response `200`

Messages read so far, pass counter, signal level and the last observations

- object
  - `contact_id` integer
  - `processed` integer
  - `total` integer
  - `pass_index` integer
  - `pass_count` integer
  - `phase` 'reading' | 'writing': Reading a stretch of conversation, or filing what was found in it. A pass takes about a minute, so both are published: without this the counter stands still for that minute, which reads as a dead import.
  - `pass_range` object: The stretch the current pass covers. Absent on a counter written before phases existed.
    - `from_message_id` integer
    - `to_message_id` integer
    - `from_at` string, date-time
    - `to_at` string, date-time
    - `messages` integer
  - `sweep_window` integer: The plan's window, when the sweep has one. Absent means the whole history.
  - `history_total` integer: The whole history behind that window.
  - `signal` 'excellent' | 'good' | 'starter'
  - `latest_observations` string[]
  - `started_at` string, date-time
  - `updated_at` string, date-time: Last heartbeat: what tells a working sweep from one whose worker died.

## Other responses

- `204`: No import running for this contact
- `404`: Contact not found

---

[API](https://skmtc.dev/memchats/apis/memchats-api.md) · [All operations](https://skmtc.dev/memchats/apis/memchats-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memchats/apis/memchats-api/revisions/e62bca06f785?raw)
