---
title: "Validate Github Repo Endpoint"
method: POST
path: "/v1/connectors/validate-github-repo"
tags: ["v1-connectors"]
---

# Validate Github Repo Endpoint

`POST /v1/connectors/validate-github-repo`

Validate if a GitHub repository exists and is accessible.

This endpoint proxies the GitHub API check to avoid CORS issues from the frontend.
Validates repository format and checks accessibility via GitHub API.

Args:
    repo: Repository in format "username/repo"
    github_token: Optional GitHub personal access token for private repos

Returns:
    {
        "valid": bool,
        "status": "valid" | "private" | "invalid" | "error",
        "message": str
    }

## Request body

- ValidateGitHubRepoRequest
  - `repo` string, required
  - `github_token` string, nullable

## Response `200`

Successful Response

- GitHubRepoValidationResponse
  - `valid` boolean, required
  - `status` 'valid' | 'private' | 'invalid' | 'error', required
  - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tryardent/apis/fastapi.md) · [All operations](https://skmtc.net/tryardent/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryardent/fastapi/revisions/71b66f68e19c/schema)
