Get a branch
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/branches/{branchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/branches/{branchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/branches/{branchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/branches/{branchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/branches/{branchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.omniapp.co/api/v1/branches/{branchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/branches/{branchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"branch": {
"id": "123e4567-e89b-12d3-a456-426614174001",
"name": "feature/new-metrics",
"description": null,
"openToViewers": false,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-20T14:30:00.000Z",
"parts": [
{
"kind": "model",
"id": "223e4567-e89b-12d3-a456-426614174002",
"modelId": "323e4567-e89b-12d3-a456-426614174003",
"modelName": "ecommerce",
"pullRequestUrl": null,
"allowed": true,
"drafts": []
},
{
"kind": "draft",
"id": "423e4567-e89b-12d3-a456-426614174004",
"documentId": "523e4567-e89b-12d3-a456-426614174005",
"documentIdentifier": "abc123",
"modelId": "323e4567-e89b-12d3-a456-426614174003",
"name": "Revenue dashboard",
"allowed": false,
"reason": "no_content_edit_rights"
}
]
},
"success": true
}{
"detail": "<string>",
"status": 400
}{
"detail": "<string>",
"status": 403
}{
"detail": "<string>",
"status": 404
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Branch APIs
Get a branch
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.
GET
/
v1
/
branches
/
{branchId}
Get a branch
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/branches/{branchId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{instance}.omniapp.co/api/v1/branches/{branchId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{instance}.omniapp.co/api/v1/branches/{branchId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{instance}.omniapp.co/api/v1/branches/{branchId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{instance}.omniapp.co/api/v1/branches/{branchId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{instance}.omniapp.co/api/v1/branches/{branchId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{instance}.omniapp.co/api/v1/branches/{branchId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"branch": {
"id": "123e4567-e89b-12d3-a456-426614174001",
"name": "feature/new-metrics",
"description": null,
"openToViewers": false,
"createdAt": "2026-01-15T10:00:00.000Z",
"updatedAt": "2026-01-20T14:30:00.000Z",
"parts": [
{
"kind": "model",
"id": "223e4567-e89b-12d3-a456-426614174002",
"modelId": "323e4567-e89b-12d3-a456-426614174003",
"modelName": "ecommerce",
"pullRequestUrl": null,
"allowed": true,
"drafts": []
},
{
"kind": "draft",
"id": "423e4567-e89b-12d3-a456-426614174004",
"documentId": "523e4567-e89b-12d3-a456-426614174005",
"documentIdentifier": "abc123",
"modelId": "323e4567-e89b-12d3-a456-426614174003",
"name": "Revenue dashboard",
"allowed": false,
"reason": "no_content_edit_rights"
}
]
},
"success": true
}{
"detail": "<string>",
"status": 400
}{
"detail": "<string>",
"status": 403
}{
"detail": "<string>",
"status": 404
}{
"error": "<response_code>",
"message": "<error_reason>"
}{
"error": "<response_code>",
"message": "<error_reason>"
}Authorizations
Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
Path Parameters
The organization-wide branch ID (orgBranchId). This isn't the same as the ID of a branch model.
Example:
"123e4567-e89b-12d3-a456-426614174001"
Query Parameters
Organization API key required. The membership ID of the user to act as.
Was this page helpful?

