---
title: "Change a custom role. Members get the new permissions at once; a new base role signs them out"
method: PATCH
path: "/api/v1/team/custom-roles/{id}"
---

# Change a custom role. Members get the new permissions at once; a new base role signs them out

`PATCH /api/v1/team/custom-roles/{id}`

## Request

- Base URL: `http://127.0.0.1:4310`
- URL: `http://127.0.0.1:4310/api/v1/team/custom-roles/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `sfb_session`

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `base_role` 'owner' | 'manager' | 'receptionist' | 'practitioner': Sets the rank: who may grant the role and manage its members
  - `scopes` string[]: Permissions; each must be one you hold. Owner-only permissions need an owner base
  - `restrict_to_staff` boolean: Own diary and the clients they serve only
  - `expected_version` integer

## Response `200`

OK

- object

## Other responses

- `400`: Validation error
- `401`: Unauthenticated
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict or invalid state

---

[API](https://skmtc.dev/scalingfirm/apis/tsf-booking-api.md) · [All operations](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalingfirm/apis/tsf-booking-api/revisions/81704199cd37?raw)
