---
title: "Update the priorities of branch protections for a repository."
method: POST
path: "/repos/{owner}/{repo}/branch_protections/priority"
tags: ["repository"]
---

# Update the priorities of branch protections for a repository.

`POST /repos/{owner}/{repo}/branch_protections/priority`

## Path parameters

- `owner` string, required
- `repo` string, required

## Request body

- UpdateBranchProtectionPriories — UpdateBranchProtectionPriories a list to update the branch protection rule priorities
  - `ids` integer[]

## Response `204`

APIEmpty is an empty response

## Other responses

- `404` — APINotFound is a not found empty response
- `422` — APIValidationError is error format response related to input validation
- `423` — APIRepoArchivedError is an error that is raised when an archived repo should be modified

---

[API](https://skmtc.net/gitea/apis/gitea-api.md) · [All operations](https://skmtc.net/gitea/apis/gitea-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gitea/gitea-api/revisions/350de506cefa/schema)
