---
title: "Update Role"
method: PUT
path: "/v2/company/{company_id}/roles/{role_id}"
tags: ["Roles"]
---

# Update Role

`PUT /v2/company/{company_id}/roles/{role_id}`

## Path parameters

- `company_id` integer, required
- `role_id` integer, required

## Headers

- `x-api-version` string — An API version
- `x-company-guid` string, uuid

## Request body

- object
  - `department_id` integer — Department ID. If this role is not assigned to a department, this value will be zero
  - `sort` integer — The order in which the roles will be listed in the web app
  - `color` string — A hex number representing the color
  - `name` string — Role name
  - `job_code` string — Job code
  - `stations` object[] — Stations this role contains
    - `name` string, required — The name of this station
  - `is_tipped_role` boolean — When zero, role is a non tipped role, when one, role is tipped role

## Response `200`

OK

- object
  - `object` 'role', required
  - `data` object, required
    - `id` integer — Role ID
    - `company_id` integer — Company ID
    - `location_id` integer — Location ID
    - `department_id` integer — Department ID
    - `color` string, nullable — Hex colour adapted for light mode backgrounds via WCAG contrast adjustment
    - `num_stations` integer — The number of stations this role contains
    - `name` string — Role name
    - `job_code` string, nullable — Job code
    - `sort` integer, nullable — The order in which the roles will be listed in the web app
    - `stations` object[]
      - `id` integer — Station ID
      - `station_number` integer
      - `name` string — The name of this station
    - `created` string, date-time, nullable — The ISO8601 date and time in UTC when the role was created
    - `modified` string, date-time, nullable — The ISO8601 date and time in UTC when the role was modified
    - `is_tipped_role` boolean — When true, role is tipped. Otherwise the role is non tipped
    - `color_code` string, nullable — Color code
    - `color_dark` string, nullable — Hex colour adapted for dark mode backgrounds via WCAG contrast adjustment

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not found
- `422` — Unprocessable Entity
- `500` — Server Error

---

[API](https://skmtc.net/7shifts/apis/7shifts-api.md) · [All operations](https://skmtc.net/7shifts/apis/7shifts-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/7shifts/7shifts-api/revisions/96a02ef888ab/schema)
