---
title: "Get a branch"
method: GET
path: "/v1/branches/{branchId}"
tags: ["Branches"]
---

# Get a branch

`GET /v1/branches/{branchId}`

## Request

- Base URL: `https://blobsrus.omniapp.co/api`
- URL: `https://blobsrus.omniapp.co/api/v1/branches/{branchId}`
- Auth: HTTP bearer

Get a branch and its parts, as the caller sees them. Each branch part includes whether the caller may merge it, and a reason code when they may not. The response only includes branch parts that the caller can see.

## Path parameters

- `branch_id` string, uuid, required

## Query parameters

- `userId` string, uuid

## Response `200`

The branch and the parts the caller may see.

- object
  - `branch` object
    - `id` string, uuid, required: The organization-wide branch ID.
    - `name` string, required: The branch's name.
    - `description` string: The branch's description, if one was set.
    - `openToViewers` boolean, required: Whether Viewers and Restricted Queriers see this branch instead of production. See [Opening a branch to viewers](/content/develop/branch-mode#opening-a-branch-to-viewers).
    - `createdAt` string, date-time, required: When the branch was created.
    - `updatedAt` string, date-time, required: When the branch was last updated.
    - `parts` union[]: The branch's parts, each either a changed model (which contains the drafts on it) or a draft on a model with no changes of its own.
      - union
        - BranchModelPart
          - `id` string, uuid, required: ID of this branch's layer on the model.
          - `allowed` boolean, required: Whether the caller may merge this branch part.
          - `drafts` object[], required: Drafts this model layer contains, regardless of who wrote them.
            - `id` string, uuid: The draft's ID.
            - `documentId` string, uuid: ID of the published document the draft belongs to.
            - `documentIdentifier` string: The published document's identifier (URL slug).
            - `modelId` string, uuid: ID of the base model.
            - `name` string: The draft's name.
          - `kind` 'model', required: The kind of branch part. This will be `model`.
          - `modelId` string, uuid, required: ID of the base model this layer belongs to.
          - `modelName` string, required: Name of the base model.
          - `pullRequestUrl` string, required: URL of this layer's pull request, if one exists.
          - `reason` 'no_promote_rights' | 'git_follower' | 'pull_request_required' | 'pr_not_merged' | 'no_settings_rights': Why the caller may not merge this branch part. Only present when `allowed` is `false`. | Reason | Meaning | |--------|---------| | `no_promote_rights` | The caller lacks permission to promote changes on this model. | | `git_follower` | The model follows Git as its source of truth; changes can only be promoted through a merged pull request. | | `pull_request_required` | This model requires pull requests and this layer doesn't have one. | | `pr_not_merged` | This layer has an open pull request that hasn't been merged yet. | | `no_content_edit_rights` | The caller lacks permission to edit this content in a branch. | | `no_settings_rights` | Reserved for modelless branch parts; not yet in use. |
        - BranchPartDraft
          - `allowed` boolean, required: Whether the caller may merge this branch part.
          - `documentId` string, uuid, required: ID of the published document the draft belongs to.
          - `documentIdentifier` string, required: The published document's identifier (URL slug).
          - `kind` 'draft', required: The kind of branch part. This will be `draft`.
          - `name` string, required: The draft's name.
          - `modelId` string, uuid, required: ID of the base model this layer belongs to.
          - `reason` 'no_content_edit_rights': Why the caller may not merge this part. Only present when `allowed` is `false`. | Reason | Meaning | |--------|---------| | `no_content_edit_rights` | The caller lacks permission to edit this content in a branch. |
  - `success` boolean

## Other responses

- `400`: An Organization API key was used without a `userId`.
- `403`: Forbidden Possible error messages: - `Branch is not visible to the user` - the branch exists but the caller can't discover it - A Personal Access Token was used with a `userId` naming a different member
- `404`: Not Found Possible error messages: - `Branch with id <branchId> does not exist` - the ID names a retired branch, a model-level layer ID rather than an org-wide branch ID, or a branch in another organization
- `429`: Too Many Requests - Rate limit exceeded (60 requests/minute)
- `500`: Internal Server Error

## Changes

- **2026-11-03** `43290040f88f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omni/apis/omni-api/changes/v1/branches/:branchId/get.md)

---

[API](https://skmtc.dev/omni/apis/omni-api.md) - [All operations](https://skmtc.dev/omni/apis/omni-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omni/apis/omni-api/revisions/43290040f88f?raw)
