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

# POST /set-role-rule

`POST /set-role-rule`

## Request

- Base URL: `https://api.akeyless.io`
- URL: `https://api.akeyless.io/set-role-rule`
- Auth: none declared

## 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.dev/akeyless/apis/identity-access.md) - [All operations](https://skmtc.dev/akeyless/apis/identity-access/llms.txt) - [OpenAPI document](https://skmtc.dev/akeyless/apis/identity-access/revisions/6fbc3858ec88?raw)
