---
title: "Get Branch"
method: GET
path: "/branches/{branch_id}"
tags: ["Branches"]
---

# Get Branch

`GET /branches/{branch_id}`

Get branch details by ID.

    Used by CLI to poll for branch status after calling POST /agents/deploy.
    Poll until status is READY (success) or FAILED/TIMEOUT (failure).

## Path parameters

- `branch_id` string, required

## Response `200`

Successful Response

- BranchResponse — Full branch details including current version.
  - `agent_id` string, required — Parent agent ID
  - `created_at` string, date-time, nullable — Creation timestamp
  - `current_version` VersionSummary — Abbreviated version info for embedding in branch responses.
    - `deployed_at` string, date-time, required — When this version was deployed
    - `git_hash` string, required — Git commit hash
    - `git_message` string — Git commit message
    - `id` string, required — Version ID
    - `source_filesystem_id` string, nullable — Filesystem snapshot that can reopen this version in Agent Builder
    - `status` 'DEPLOYING' | 'ACTIVE' | 'FAILED' | 'UNHEALTHY' | 'DRAINING' | 'RETIRED' | 'ROLLED_BACK', required — Status of a version in its lifecycle.
  - `git_branch` string, required — Original git branch name
  - `git_branch_normalized` string, required — DNS-safe branch name
  - `id` string, required — Branch ID
  - `replicas` integer, required — Desired replica count
  - `retired_at` string, date-time, nullable — When branch was retired
  - `retired_reason` string, nullable — Reason for retirement
  - `updated_at` string, date-time, nullable — Last update timestamp

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.net/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/versions/f24a474dc415/schema)
