---
title: "List recent commits for a repository branch"
method: GET
path: "/repository/{repository_id}/commits"
tags: ["Repositories"]
---

# List recent commits for a repository branch

`GET /repository/{repository_id}/commits`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/repository/{repository_id}/commits`
- Auth: HTTP bearer

## Path parameters

- `repository_id` integer, required

## Query parameters

- `branch` string, required
- `per_page` integer, nullable

## Response `200`

List of commits

- CommitListResponse
  - `commits` CommitInfo[], required
    - `author` string, required: Author name
    - `author_email` string, required: Author email
    - `date` string, date-time, required: Commit date in ISO 8601 format
    - `message` string, required: Commit message
    - `sha` string, required: Commit SHA hash

## Other responses

- `401`: Unauthorized
- `403`: Git provider permission required
- `404`: Repository not found
- `500`: Internal server error

## Changes

- **2026-09-07** `38e97c3c35dd`: 1 info
  - added the non-success response with the status `403`
- **2026-09-07** `f7404eb7ac98`: 1 info
  - removed the non-success response with the status `403`
- **2026-08-11** `7493127fec25`: 1 info
  - added the non-success response with the status `403`
- **2026-04-25** `774be20905f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/repository/:repository_id/commits/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
