Skip to main content
POST
/
repositories
Index a new repository
curl --request POST \
  --url https://apigcp.trynia.ai/v2/repositories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "repository": "microsoft/vscode",
  "branch": "main"
}'
{
  "success": true,
  "data": {
    "repository_id": "<string>",
    "status": "<string>",
    "status_url": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Headers

X-GitHub-Token
string

Optional GitHub token for private repository access

Body

application/json
repository
string
required

Repository identifier in owner/repo format or full GitHub URL (supports folder paths like owner/repo/tree/branch/folder)

Example:

"microsoft/vscode"

branch
string

Branch to index (defaults to repository's default branch)

Example:

"main"

Response

Repository indexing started successfully

success
boolean
data
object