---
title: "Backfilling GitHub data"
canonical_url: "https://docs.getdx.com/onboarding/github-backfill/"
md_url: "https://docs.getdx.com/onboarding/github-backfill.md"
last_updated: "2026-05-08"
---

# Backfilling GitHub data
To backfill historical onboarding data, provide DX a GitHub API token and your GitHub organization slug.

## Step 1: Get your organization slug

1. Go to [your organizations page](https://github.com/settings/organizations).
2. Copy your organization name.

![GitHub Organizations Page Screenshot](https://docs.getdx.com/assets/images/onboarding/github-organizations.png)

## Step 2: Create an API token

You can use either a fine-grained or classic token. The token is only needed for the duration of the backfill.

### Fine-grained token

1. Go to your [personal access tokens page](https://github.com/settings/tokens) and click **Generate new token**.
2. Under **Repository access**, select "All repositories".
3. Under **Repository permissions**, enable **Pull requests** → Read-only.
4. Under **Organization permissions**, enable **Members** → Read-only.

### Classic token

1. Go to your [personal access tokens page](https://github.com/settings/tokens) and click **Generate new token (classic)**.
2. Enable the `repo` scope.
3. Enable the `admin:org` → `read:org` scope.

## Step 3: Run the backfill

Navigate to [Onboarding setup](https://app.getdx.com/onboarding/setup) and enter your organization slug and API token to start the backfill.

> **Note**: What DX does with your API token:
>
> 1. Get a list of contributors in your org
> 2. Get each contributor's earliest 10 PRs
> 3. Store the PR merge timestamps to calculate time-to-Nth PR metrics
---

## Sitemap

[Overview of all docs pages](/llms.txt)
