---
title: "Update a consumer role"
method: PUT
path: "/apiops/projects/{projectName}/consumer-roles/{roleName}"
tags: ["Consumer Role"]
---

# Update a consumer role

`PUT /apiops/projects/{projectName}/consumer-roles/{roleName}`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/consumer-roles/{roleName}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/consumer-roles/:roleName/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates the role and redeploys it. A null field keeps its stored value; an empty oauthScope removes it; a different name renames the role (consumers keep it). Same name and OAuth scope rules as create.

## Path parameters

- `projectName` string, required
- `roleName` string, required

## Request body

- ApiOpsConsumerRoleWriteDTO
  - `name` string
  - `oauthScope` string

## Response `200`

OK

- ApiOpsMutationResponseApiOpsResponseConsumerRole
  - `status` 'SUCCESS' | 'FAILURE'
  - `resourceVersion` integer
  - `runtimeDeployment` ApiOpsRuntimeDeploymentDTO
    - `state` 'IN_SYNC' | 'DEGRADED'
    - `environments` Environment[]
      - `name` string
      - `acknowledged` boolean
      - `detail` string
  - `result` ApiOpsResponseConsumerRole
    - `name` string
    - `oauthScope` string

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
