> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aventure.vc/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aventure.vc/_mcp/server.

# Sync person repositories from GitHub

POST https://api.aventure.vc/v1/people/{personId}/repositories/sync

Fetches repositories from GitHub for the person's current github URL links and replaces the person's synced rows. Returns the full synced list ordered by stargazers. 404 when the person has no current github URL link.

Reference: https://docs.aventure.vc/api-reference/a-venture-api/repositories/sync-person-repositories

## Authentication

- `Authorization` header (bearer token, required) — User bearer token: Supabase or Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
- `X-API-Key` header (required) — Admin API key for system-to-system write operations

## Request

### Path parameters

- `personId` (string, required) — Person UUID owning the repositories

## Response

### 200

OK

- `list of object`
  - `forkCount` (integer, required)
  - `githubId` (long, required) — GitHub's stable numeric repository id; sync upsert key per owner
  - `id` (long, required)
  - `isArchived` (boolean, required) — True when the repository is archived on GitHub
  - `isFork` (boolean, required) — True when the repository is a fork of another repository
  - `name` (string, required) — Repository name (slug segment after the login)
  - `ownerLogin` (string, required) — GitHub account login (org or user) the repository belongs to
  - `stargazerCount` (integer, required)
  - `topic` (list of string, required) — Repository topics reported by GitHub
  - `url` (string, required) — Canonical https GitHub repository page URL
  - `createdAt` (datetime, optional, nullable)
  - `description` (string, optional, nullable)
  - `homepageUrl` (string, optional, nullable) — Project homepage URL declared on the repository
  - `language` (string, optional, nullable) — Primary language reported by GitHub
  - `license` (string, optional, nullable) — SPDX license id reported by GitHub
  - `repoCreatedAt` (datetime, optional, nullable) — GitHub created_at of the repository
  - `repoPushedAt` (datetime, optional, nullable) — GitHub pushed_at of the repository at last sync
  - `updatedAt` (datetime, optional, nullable)

## Examples

**Response**

```json
[
  {
    "forkCount": 1,
    "githubId": 1,
    "id": 1,
    "isArchived": true,
    "isFork": true,
    "name": "string",
    "ownerLogin": "string",
    "stargazerCount": 1,
    "topic": [
      "string"
    ],
    "url": "string",
    "createdAt": "2024-01-15T09:30:00Z",
    "description": "string",
    "homepageUrl": "string",
    "language": "string",
    "license": "string",
    "repoCreatedAt": "2024-01-15T09:30:00Z",
    "repoPushedAt": "2024-01-15T09:30:00Z",
    "updatedAt": "2024-01-15T09:30:00Z"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.aventure.vc/v1/people/personId/repositories/sync"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.aventure.vc/v1/people/personId/repositories/sync';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.aventure.vc/v1/people/personId/repositories/sync"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.aventure.vc/v1/people/personId/repositories/sync")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.aventure.vc/v1/people/personId/repositories/sync")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.aventure.vc/v1/people/personId/repositories/sync', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.aventure.vc/v1/people/personId/repositories/sync");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.aventure.vc/v1/people/personId/repositories/sync")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```