latestOpenAPI 3.0.02026-07-2422987517.5 KB

ff1aeb3fda8b

Company role

Update a company role

Updates a company role's name/description and, when a permissions array is supplied, replaces the role's permission set. If any supplied permission id does not exist a 404 is returned.

patch/v1/companies/{company_id}/company_roles/{id}

Path parameters

company_idstring uuid required

The UUID of the company the nested resource belongs to.

idstring required

The id of the resource. This is a UUID for most resources, but for user endpoints it is the user's Firebase UID (an opaque string), so no uuid format is asserted here.

Parameters

#/paths/~1v1~1users/get/parameters/0 — unresolved $ref

Request body

namestring
descriptionstring
permissionsstring[]

Full replacement set of permission ids for the role.

Response

The updated company role.

idstring uuid required
company_idstring uuid required
namestring required
descriptionstring nullable
created_atstring date-time
updated_atstring date-time

Example response

{
  "name": "Finance",
  "permissions": [
    {
      "name": "cards_view"
    }
  ]
}