---
title: "Update Branch"
method: PUT
path: "/v1/prompts/{alias}/branches/{name}"
tags: ["Prompt"]
---

# Update Branch

`PUT /v1/prompts/{alias}/branches/{name}`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/prompts/{alias}/branches/{name}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/prompts/:alias/branches/:name/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates the name of an existing branch in your prompt on Confident AI.

## Request body

- UpdatePromptBranchRequest
  - `name` string: The new name of the branch you're trying to update.
  - `required` unknown

## Response `200`

- UpdatePromptBranchResponse
  - `success` boolean, required: This is true if the prompt branch was successfully deleted.
  - `data` object, required
    - `id` string, required: This is the id of the updated prompt branch.
  - `deprecated` boolean, required: This is true if this endpoint is deprecated.

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
