---
title: "Trigger Backfill History"
method: POST
path: "/api/threads/{thread_id}/backfill-history"
tags: ["sync-admin", "sync-admin"]
---

# Trigger Backfill History

`POST /api/threads/{thread_id}/backfill-history`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/threads/{thread_id}/backfill-history`
- Auth: none declared

Trigger LWM backfill for thread (load older historical messages).

This is an on-demand operation triggered when:
- User scrolls to top of thread
- User searches within thread history
- User explicitly requests "Load full history"

The backfill runs in background and updates lwm_progress_id.

## Path parameters

- `thread_id` integer, required

## Request body

- BackfillHistoryRequest: Request to backfill historical messages.
  - `max_messages` integer, nullable
  - `priority` string

## Response `200`

Successful Response

- BackfillHistoryResponse: Response from backfill request.
  - `status` string, required
  - `thread_id` integer, required
  - `task_id` string, nullable, required
  - `message` string, required
  - `estimated_messages` integer, nullable, required

## Other responses

- `422`: Validation Error

---

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