---
title: "Rename branch"
method: POST
path: "/v1/git/worktrees/{id}/graduate"
tags: ["git"]
---

# Rename branch

`POST /v1/git/worktrees/{id}/graduate`

Triggers renaming of any branch to a semantic name using Claude or a custom name

## Path parameters

- `id` string, required

## Request body

- InternalHandlersGraduateBranchRequest
  - `branch_name` string — Optional custom branch name to graduate to

## Response `200`

OK

- object

## Other responses

- `400` — Bad request (invalid branch name, branch already exists, etc.)
- `404` — Worktree not found
- `422` — No title available for automatic naming
- `500` — Internal server error

---

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