---
title: "POST /set-role-rule"
method: POST
path: "/set-role-rule"
tags: ["v2"]
---

# POST /set-role-rule

`POST /set-role-rule`

## Request body

- SetRoleRule
  - `capability` string[], required — List of the approved/denied capabilities in the path options: [read, create, update, delete, list, deny]
  - `json` boolean — Set output format to JSON
  - `path` string, required — The path the rule refers to
  - `role-name` string, required — The role name to be updated
  - `rule-type` string — item-rule, target-rule, role-rule, auth-method-rule, search-rule, reports-rule, gw-reports-rule, sra-reports-rule, ara-reports-rule, sra-rule, ara-rule
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `ttl` integer — RoleRule ttl
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication

## Response `200`

setRoleRuleResponse wraps response body.

- SetRoleRuleOutput

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

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