---
title: "Update a role of an organization. Only the organization owner or a delegated team member with the manageRoles permission may call this."
method: PATCH
path: "/v2/organizations/{organizationId}/roles/{roleId}"
tags: ["Organization Roles Api Service"]
---

# Update a role of an organization. Only the organization owner or a delegated team member with the manageRoles permission may call this.

`PATCH /v2/organizations/{organizationId}/roles/{roleId}`

## Request

- Base URL: `https://app.metricool.com/api`
- URL: `https://app.metricool.com/api/v2/organizations/{organizationId}/roles/{roleId}`
- Auth: none declared

## Path parameters

- `organizationId` integer, required
- `roleId` integer, required

## Query parameters

- `fields` string[], required

## Request body

- UpdateBrandRoleRequest
  - `name` string
  - `description` string
  - `color` string
  - `actions` BrandRoleActions, required
    - `viewAnalytics` boolean
    - `viewInbox` boolean
    - `viewPlanner` boolean
    - `viewAds` boolean
    - `viewSmartlinks` boolean
    - `fullAccessReports` boolean
    - `fullAccessInbox` boolean
    - `fullAccessPlanner` boolean
    - `fullAccessAds` boolean
    - `fullAccessSmartlinks` boolean
    - `fullAccessHashtagTracker` boolean
    - `editBrand` boolean
    - `schedulePosts` boolean
    - `publishPosts` boolean
    - `approvePosts` boolean
    - `viewCondensedAnalytics` boolean
    - `fullAccessDashboards` boolean
    - `viewDashboards` boolean
    - `editFlow` boolean
    - `viewFlow` boolean
    - `fullAccessStudio` boolean
  - `organizationActions` OrganizationRoleChangeActionsDto: Partial update of the organization-level permissions granted by a brand role. Each field is nullable: only the fields also listed in the request's 'fields' query param are actually applied - the rest are ignored, whether null or not. Omitting this object entirely from the request body (leaving it null) means 'do not touch organization permissions in this PATCH'.
    - `manageBrands` boolean: Whether the role can create and manage brands at the organization level.
    - `manageRoles` boolean: Whether the role can create and manage other brand roles at the organization level.
    - `manageTeamMembers` boolean: Whether the role can manage team members at the organization level.
    - `manageAgencyConfig` boolean: Whether the role can manage the agency configuration.
    - `manageAgencyClients` boolean: Whether the role can manage agency clients.

## Response `200`

Role updated.

- JsonOkResponseBrandRole
  - `metadata` object
  - `page` JsonPaging
    - `next` string
  - `data` BrandRole
    - `id` integer
    - `userId` integer, required
    - `name` string, required
    - `description` string
    - `color` string
    - `type` string
    - `assignable` boolean
    - `teamMemberOnly` boolean
    - `deletedDate` DateTimeInfo
      - `dateTime` string, required: Local Date-time represented with a certain timezone
      - `timezone` string: Timezone applied to the datetime
    - `deleted` boolean
    - `actions` BrandRoleActions, required
      - `viewAnalytics` boolean
      - `viewInbox` boolean
      - `viewPlanner` boolean
      - `viewAds` boolean
      - `viewSmartlinks` boolean
      - `fullAccessReports` boolean
      - `fullAccessInbox` boolean
      - `fullAccessPlanner` boolean
      - `fullAccessAds` boolean
      - `fullAccessSmartlinks` boolean
      - `fullAccessHashtagTracker` boolean
      - `editBrand` boolean
      - `schedulePosts` boolean
      - `publishPosts` boolean
      - `approvePosts` boolean
      - `viewCondensedAnalytics` boolean
      - `fullAccessDashboards` boolean
      - `viewDashboards` boolean
      - `editFlow` boolean
      - `viewFlow` boolean
      - `fullAccessStudio` boolean
    - `organizationActions` OrganizationRoleActionsDto, required: Organization-level permissions granted by a brand role, on top of the per-brand actions. Never null in a read response - a role that never had organization permissions set is reported with every field false.
      - `manageBrands` boolean: Whether the role can create and manage brands at the organization level.
      - `manageRoles` boolean: Whether the role can create and manage other brand roles at the organization level.
      - `manageTeamMembers` boolean: Whether the role can manage team members at the organization level.
      - `manageAgencyConfig` boolean: Whether the role can manage the agency configuration.
      - `manageAgencyClients` boolean: Whether the role can manage agency clients.
    - `assignedUsersCount` integer
    - `assignedEnabledCount` integer
    - `assignedDisabledCount` integer

## Other responses

- `400`: Invalid request body, or roleId does not belong to the organization owner or is a SYSTEM/INTERNAL role.
- `403`: Caller is not a regular-user session, the organization permissions feature is disabled for the organization's owner, the organization's owner's plan does not qualify for an organization, or the caller cannot manage the roles of this organization, or roleId is the role granting the caller their own delegation.
- `404`: Organization not found, its owner account could no longer be resolved, or no role exists with roleId.

---

[API](https://skmtc.dev/metricool/apis/metricool-api.md) · [All operations](https://skmtc.dev/metricool/apis/metricool-api/llms.txt) · [OpenAPI document](https://skmtc.dev/metricool/apis/metricool-api/revisions/aea9d9a8415a?raw)
