---
title: "Sets priority for a given role."
method: PUT
path: "/roles/{role_id}/priority"
tags: ["Permissions"]
---

# Sets priority for a given role.

`PUT /roles/{role_id}/priority`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/roles/{role_id}/priority`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/roles/:role_id/priority/put.ts> (a function with typed inputs; its response is checked against the schema)

Sets priority for a given role.

## Path parameters

- `role_id` string, required

## Request body

- SetRolePriorityRequest
  - `priority` integer, required: The priority to be set for the role.

## Response `200`

Successful operation

- RoleInfo
  - `id` string, required
  - `name` string, required
  - `description` string
  - `priority` integer

## Other responses

- `400`: Bad request
- `401`: Unauthorized - Invalid or missing API key
- `404`: Not found
- `500`: Internal server error
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
