Skip to main content
GET
/
api
/
commits
List commits
curl --request GET \
  --url https://api.example.com/api/commits \
  --header 'Authorization: Bearer <token>'
[
  {
    "hash": "<string>",
    "date": "<string>",
    "message": "<string>",
    "refs": "<string>",
    "body": "<string>",
    "author_name": "<string>",
    "author_email": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Send either a Sourcebot API key (sbk_...) or, on EE instances with OAuth enabled, an OAuth access token (sboa_...) in the Authorization header.

Query Parameters

repo
string
required

The fully-qualified repository name.

query
string

Filter commits by message content (case-insensitive).

since
string

Return commits after this date. Accepts ISO 8601 or relative formats (e.g. 30 days ago).

until
string

Return commits before this date. Accepts ISO 8601 or relative formats.

author
string

Filter commits by author name or email (case-insensitive).

ref
string

The git ref (branch, tag, or commit SHA) to list commits from. Defaults to HEAD.

path
string

Restrict commits to those that touch this file path.

page
integer
default:1
Required range: x > 0
perPage
integer
default:50
Required range: 0 < x <= 100

Response

Paginated commit list.

hash
string
required

The full commit SHA.

date
string
required

The commit date in ISO 8601 format.

message
string
required

The commit subject line.

refs
string
required

Refs pointing to this commit (e.g. branch or tag names).

body
string
required

The commit body (everything after the subject line).

author_name
string
required
author_email
string
required