> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yertle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Branch Head Commit

> Get the HEAD commit hash for a branch (lightweight staleness check).



## OpenAPI

````yaml get /orgs/{org_id}/nodes/{node_id}/tree/{branch}/head
openapi: 3.1.0
info:
  title: Flow API
  description: Content-addressing backend with Git-like versioning
  version: 1.0.0
servers:
  - url: https://api.yertle.com
    description: Production
security: []
paths:
  /orgs/{org_id}/nodes/{node_id}/tree/{branch}/head:
    get:
      tags:
        - nodes
      summary: Get Branch Head Commit
      description: Get the HEAD commit hash for a branch (lightweight staleness check).
      operationId: >-
        get_branch_head_commit_orgs__org_id__nodes__node_id__tree__branch__head_get
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: node_id
          in: path
          required: true
          schema:
            type: string
            title: Node Id
        - name: branch
          in: path
          required: true
          schema:
            type: string
            title: Branch
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchHeadCommitResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BranchHeadCommitResponse:
      properties:
        node_id:
          type: string
          title: Node Id
          description: Node ID
        branch:
          type: string
          title: Branch
          description: Branch name
        commit:
          type: string
          title: Commit
          description: HEAD commit ID, or 'none' if the branch has no commits yet
      type: object
      required:
        - node_id
        - branch
        - commit
      title: BranchHeadCommitResponse
      description: Response for GET /orgs/{org_id}/nodes/{node_id}/tree/{branch}/head.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````