Skip to main content
GET
Get a branch's head commit

Authorizations

Authorization
string
header
required

Your Reason API key from Settings > API. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, knowledge:read, memory:read, memory:write, skills:read, skills:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, automations:read, automations:write, agent_auth:read. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).

Path Parameters

orgId
string
required

Organization id or slug. Resolve it with GET /v3/self.

owner
string
required

Repository owner (user or organization): the part before the slash of a full_name that listRepositories returns.

repo
string
required

Repository name: the part after the slash of a full_name that listRepositories returns.

Query Parameters

branch
string

Branch name, for example main or release/2026-10. Omit it to read the repository's default branch.

Response

The branch and the commit it points at.

full_name
string
required

GitHub repository path in owner/name form, in GitHub's own spelling whatever case the request used.

provider
enum<string>
required

Source-control provider for this repository.

Available options:
github
branch
string
required

The branch that was read.

default_branch
string
required

The repository's default branch.

is_default_branch
boolean
required

Whether branch is the default branch.

sha
string
required

Full 40-character commit SHA at the tip of branch, read from GitHub at most 5 seconds before the response.