---
title: "Index Repo"
method: POST
path: "/repos/index"
tags: ["repos"]
---

# Index Repo

`POST /repos/index`

## Request body

- IndexRepoRequest
  - `url` string, required — GitHub repo URL or owner/name shorthand
  - `ref` string, nullable — Branch ref to index (defaults to repo's default branch)
  - `commit_depth` '2000' | 'full'
  - `commit_limit` integer, nullable — Numeric commit limit (overrides commit_depth)
  - `skip_tests` boolean
  - `skip_infra` boolean
  - `follow_renames` boolean
  - `include_submodules` boolean
  - `exclude_patterns` string[]
  - `generate_docs` boolean
  - `docs_file_percentage` number
  - `wiki_style` 'comprehensive' | 'caveman' | 'reference' | 'tutorial'
  - `docs_language` 'en' | 'ru' | 'es' | 'fr' | 'de' | 'zh' | 'ja' | 'ko' | 'it' | 'pt' | 'nl' | 'pl' | 'tr' | 'ar' | 'hi'
  - `prose_cap_cents` 100 | 200 | 500 | 1000, nullable — Cents pre-authorized for AI explanations (omit to opt out)

## Response `200`

Successful Response

- IndexRepoResponse
  - `snapshot_id` string, required
  - `short_id` string, required
  - `status` 'queued' | 'indexing' | 'ready' | 'failed', required
  - `cached` boolean, required
  - `repo` RepoResponse, required
    - `id` string, required
    - `canonical_url` string, required
    - `owner` string, required
    - `name` string, required
    - `default_branch` string, required
    - `latest_known_head_sha` string, nullable
    - `is_public` boolean, required
    - `file_count` integer, nullable
    - `last_checked_at` string, date-time, nullable
    - `auto_sync_enabled` boolean
    - `github_checks_enabled` boolean
    - `last_webhook_at` string, date-time, nullable
    - `last_polled_at` string, date-time, nullable
    - `exclude_patterns` string[]
    - `max_file_pages` integer, nullable
    - `prose_refresh` string
    - `prose_daily_cap_cents` integer
    - `repowise_managed` boolean
    - `description` string, nullable
    - `primary_language` string, nullable
    - `stars` integer, nullable
    - `badge_detected_at` string, date-time, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/repowise/apis/repowise-hosted-api.md) · [All operations](https://skmtc.dev/repowise/apis/repowise-hosted-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/repowise/repowise-hosted-api/revisions/1e57283a9737/schema)
