Skip to content

Update Role

PUT
/roles/{role_id}

Redefine a role. THIS CHANGES WHAT EVERY HOLDER MAY DO, IMMEDIATELY.

permissions REPLACES the list rather than merging into it, so a value left out is a permission taken away from everyone who holds the role. That is why this operation is tiered destructive rather than write: it is a privilege change, and “re-define what the sales team may do” must not ride along in the same grant as “rename a team”.

The app refuses to edit the permissions of its locked system roles (admin, service_provider) - stripping roles:manage from admin would lock the organisation out with no recovery path - and refuses to grant anything the caller does not hold. Both reach you as a 403.

Authorizations

Parameters

Path Parameters

role_id
required

Role id (UUID).

string

Role id (UUID).

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Replace a role’s definition. Mirrors roles.RoleUpdateRequest.

permissions is a REPLACEMENT, not a merge, and it takes effect for everyone who already holds the role. That is why the operation is tiered destructive rather than write.

object
description
Any of:
string
manages_role_slugs
Any of:
Array<string>
name
Any of:
string
>= 1 characters <= 100 characters
permissions
Any of:
Array<string>
rep_limits
Any of:

Per-role reveal/ownership limits. Mirrors roles.RepLimitsSettings.

The three Literals are closed here rather than left as strings because they reach the app’s own Literal inside _apply_rep_limits.

object
conflict_company_owned
string
default: allow
Allowed values: allow warn block
conflict_contact_active
string
default: allow
Allowed values: allow warn block
max_companies
Any of:
integer
max_contacts
Any of:
integer
reveal_monthly_credit_budget
Any of:
integer
reveal_policy
string
default: no_limit
Allowed values: within_limits monthly_credit_budget no_limit

Responses

200

Successful Response

object
data
required

An open envelope for a single role, team, member or account record.

Open on purpose. The app’s own response models on this surface grow with the product - RoleResponse gained rep_limits and manages_role_slugs, TeamResponse gained channel counts and a campaign count - and a pinned mirror would SILENTLY DROP whatever it had not caught up on. A dropped permission in a role read is the worst possible kind of stale: it reads as “they do not have it”.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string