Skip to main content
GET
List commits
This endpoint is rate limited. Each call counts toward your daily request limit.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>. The token may be a Sourcebot API key, OAuth access token, or scoped access token, subject to endpoint requirements.

Query Parameters

repo
string
required

The fully-qualified repository name.

query
string

Filter commits by message content (case-insensitive). Interpreted as a POSIX BRE regex — escape metacharacters for literal matching.

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). Interpreted as a POSIX BRE regex — escape metacharacters for literal matching.

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
includeTotalCount
enum<string>
default:true

Whether to count every matching commit for the X-Total-Count header. Counting walks the entire history of ref, which is slow on repositories with long histories. When false, the response omits X-Total-Count and the last link, and the next link still marks whether more commits follow.

Available options:
true,
false
includeRefs
enum<string>
default:true

Whether to list the branches and tags that point at each commit in refs. Looking them up reads every tag in the repository, which is slow on repositories with many tags. When false, commits omit refs.

Available options:
true,
false

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.

body
string
required

The commit body (everything after the subject line).

authorName
string
required
authorEmail
string
required
refs
string

Refs pointing to this commit (e.g. branch or tag names). Omitted when includeRefs is false.