---
title: "Set the branch's title and description"
description: "The merge commit's message is the title and description."
---

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

Path: Pando API › branches

`PATCH /v1/monorepos/{owner}/{monorepo}/repos/{repo}/branches/{branch}`

The merge commit's message is the title and description.

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `updateBranch.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `updateBranch.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `updateBranch.path.repo` (string, required) — The repo's `name` (`projects-web`).
- `updateBranch.path.branch` (string, required) — The branch name, `/` encoded as `%2F`.

## Request body

_Required._

- `updateBranch.title` (string, optional)
- `updateBranch.description` (string, optional)

## Example request

```json
{
  "title": "string",
  "description": "string"
}
```

## Code samples

### cURL

```curl
curl --request PATCH \
  --url https://app.gitpando.com/v1/monorepos/string/string/repos/string/branches/string \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "string",
  "description": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/repos/string/branches/string';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({title: 'string', description: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/repos/string/branches/string"

payload = {
    "title": "string",
    "description": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "name": "string",
  "head": "string",
  "base": "string",
  "author": "string",
  "title": "string",
  "description": "string",
  "ahead": 0,
  "behind": 0,
  "mergeable": "clean",
  "stale": true,
  "last_mergeable": "string",
  "conflict_paths": [
    "string"
  ],
  "facts_at": "2019-08-24T14:15:22Z",
  "checks": {
    "sha": "string",
    "state": "success",
    "required": [
      "string"
    ],
    "checks_unknown": "string",
    "missing": [
      "string"
    ],
    "statuses": [
      {
        "sha": "string",
        "context": "string",
        "state": "pending",
        "target_url": "string",
        "description": "string",
        "creator": "string",
        "app": "string",
        "created_at": "2019-08-24T14:15:22Z"
      }
    ]
  },
  "state": "open",
  "merge_commit": "string",
  "merged_by": "string",
  "merged_at": "2019-08-24T14:15:22Z",
  "merged_machine": "string",
  "merged_agent": "string",
  "pushed_machine": "string",
  "forced": true,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
```

- `updateBranch.response.200.name` (string, required)
- `updateBranch.response.200.head` (string, required)
- `updateBranch.response.200.checks` (object, required) — GitHub's combined status, plus the required contexts and which are missing.
  - `updateBranch.response.200.checks.sha` (string | null, required)
  - `updateBranch.response.200.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
    - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
  - `updateBranch.response.200.checks.required` (array | null, required) — Null while unknown.
  - `updateBranch.response.200.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
  - `updateBranch.response.200.checks.statuses` (array<object>, required) — The latest status per context.
    - `updateBranch.response.200.checks.statuses.sha` (string, required)
    - `updateBranch.response.200.checks.statuses.context` (string, required)
    - `updateBranch.response.200.checks.statuses.state` (string, required)
      - one of `"pending"`, `"success"`, `"failure"`, `"error"`
    - `updateBranch.response.200.checks.statuses.created_at` (string, required)
      - format `date-time`
    - `updateBranch.response.200.checks.statuses.target_url` (string | null, optional)
    - `updateBranch.response.200.checks.statuses.description` (string | null, optional)
    - `updateBranch.response.200.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
    - `updateBranch.response.200.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
  - `updateBranch.response.200.checks.missing` (array<string>, optional)
- `updateBranch.response.200.state` (string, required) — `merged` when the branch's current head was landed by a Pando merge.
  - one of `"open"`, `"merged"`
- `updateBranch.response.200.base` (string | null, optional) — The merge base with the default branch; null when there is none.
- `updateBranch.response.200.author` (string | null, optional) — The user whose first push (or createBranch) made the branch.
- `updateBranch.response.200.title` (string | null, optional)
- `updateBranch.response.200.description` (string | null, optional)
- `updateBranch.response.200.ahead` (integer | null, optional) — Commits on the branch that are not on the default branch.
- `updateBranch.response.200.behind` (integer | null, optional) — Commits on the default branch that are not on the branch.
- `updateBranch.response.200.mergeable` (string, optional) — From the merge engine's dry run. `up_to_date`: the branch adds nothing. `pending`: not yet computed for the current main and head (see `last_mergeable`).
  - one of `"clean"`, `"conflicts"`, `"up_to_date"`, `"unknown"`, `"pending"`
- `updateBranch.response.200.stale` (boolean, optional) — True while ahead, behind, base and mergeable are not yet for the current main and head.
- `updateBranch.response.200.last_mergeable` (string | null, optional) — When stale: the last known mergeable answer.
- `updateBranch.response.200.conflict_paths` (array | null, optional) — The paths changed differently on both sides, from the same dry run as `mergeable` (or `last_mergeable` while stale), so a branch page shows them before Merge is pressed. Null unless that answer is `conflicts`. No cap: the same list a refused merge's 409 carries in `paths`.
- `updateBranch.response.200.facts_at` (string | null, optional) — When the facts were computed.
  - format `date-time`
- `updateBranch.response.200.merge_commit` (string | null, optional)
- `updateBranch.response.200.merged_by` (string | null, optional) — The user who merged (state merged only).
- `updateBranch.response.200.merged_at` (string | null, optional)
  - format `date-time`
- `updateBranch.response.200.merged_machine` (string | null, optional) — The name of the credential used to merge: the machine or sandbox.
- `updateBranch.response.200.merged_agent` (string | null, optional) — The agent that merged, from X-Pando-Agent, if one said so.
- `updateBranch.response.200.pushed_machine` (string | null, optional) — The name of the credential that last pushed the branch: the machine or sandbox.
- `updateBranch.response.200.forced` (boolean | null, optional) — True when the merge went past red or missing checks with force=1.
- `updateBranch.response.200.created_at` (string | null, optional)
  - format `date-time`
- `updateBranch.response.200.updated_at` (string | null, optional)
  - format `date-time`


Source: https://docs.gitpando.com/api/branches/updateBranch/index.md
