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

# Commits for one project

GET https://api.fullstackplus.ai/api/v1/projects/{projectId}/commits

One project, one branch. For several projects or branches in a single call use `/api/v1/commits`.

Reference: https://docs.fullstackplus.ai/api-reference/commits-for-one-project

## Authentication

- `X-API-Key` header (required) — Create one in the app under **Settings → API keys**. It is shown once and stored only as a hash, so it cannot be recovered — losing it means issuing a new one. A key reads the endpoints below and nothing else. It is not a session: it cannot create or delete projects, change settings, or issue another API key. It sees exactly what its owner sees, re-checked on every request, so removing someone's access to a project removes it from their key on the very next call.
- `Authorization` header (bearer token, required) — The same key, sent as `Authorization: Bearer <key>`.

## Request

### Path parameters

- `projectId` (integer, required)

### Query parameters

- `from` (string, optional) — ISO-8601. `2026-09-01` or `2026-09-01T14:30:00Z`.
- `to` (string, optional) — ISO-8601.
- `branch` (string, optional) — Defaults to `HEAD`.
- `limit` (integer, optional, default: 100)

## Response

### 200

OK. An empty repository is `commits: []`, not an error.

## Errors

### 400 Bad Request Error

Bad `from`/`to`/`branch`/`limit`.

- `any`

### 401 Unauthorized Error

Key problem.

- `any`

### 403 Forbidden Error

Git history is not enabled for you on this project.

- `any`

### 404 Not Found Error

No such project, OR you cannot see it. The two are deliberately indistinguishable so the endpoint cannot be used to discover which ids exist.

- `any`

### 429 Too Many Requests Error

Rate limited: 600/hour and 5000/day per key.

- `any`

### 502 Bad Gateway Error

Git could not be read on the project's VM.

- `any`

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.fullstackplus.ai/api/v1/projects/1/commits"

headers = {"X-API-Key": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.fullstackplus.ai/api/v1/projects/1/commits';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

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.fullstackplus.ai/api/v1/projects/1/commits"

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

	req.Header.Add("X-API-Key", "<apiKey>")

	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.fullstackplus.ai/api/v1/projects/1/commits")

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

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<apiKey>'

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.get("https://api.fullstackplus.ai/api/v1/projects/1/commits")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fullstackplus.ai/api/v1/projects/1/commits', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.fullstackplus.ai/api/v1/projects/1/commits");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fullstackplus.ai/api/v1/projects/1/commits")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```