---
title: "Backfill PRs"
method: POST
path: "/pull-requests/backfill"
tags: ["Pull Requests"]
---

# Backfill PRs

`POST /pull-requests/backfill`

Trigger historical pull request backfill in background.

## Request body

- BackfillPRsDto
  - `teamId` string, required
  - `repositoryIds` string[]
  - `startDate` string, date-time
  - `endDate` string, date-time

## Response `201`

- PullRequestBackfillResponseDto
  - `statusCode` number, required
  - `type` string, required
  - `data` PullRequestBackfillDataDto, required
    - `success` boolean, required
    - `message` string, required
    - `repositoriesCount` number, required

## Other responses

- `400` — Validation error
- `401` — Not authenticated
- `403` — Insufficient permissions
- `500` — Unexpected error

---

[API](https://skmtc.net/kodustech/apis/kodus-api.md) · [All operations](https://skmtc.net/kodustech/apis/kodus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kodustech/kodus-api/revisions/e2282ac5fb3a/schema)
