---
title: "Give manager role to a user"
method: POST
path: "/v1/workspaces/{workspaceId}/users/{userId}/roles"
tags: ["User"]
---

# Give manager role to a user

`POST /v1/workspaces/{workspaceId}/users/{userId}/roles`

## Path parameters

- `workspaceId` string, required — Represents a workspace identifier across the system.
- `userId` string, required — Represents a user identifier across the system.

## Request body

- RoleRequestV1
  - `entityId` string, required — Represents an entity identifier across the system.
  - `role` 'WORKSPACE_ADMIN' | 'TEAM_MANAGER' | 'PROJECT_MANAGER', required — Represents a valid role.
  - `sourceType` 'USER_GROUP' — Optional field used to indicate that the target of the operation is a user group, in which case the value USER_GROUP should be used, alongside a valid user group ID for the entityId field. If omitted, a user ID should be used for the entityId field.

## Response `201`

Created

- RoleDetailsDtoV1[]
  - `role` RoleDtoV1 — Represents a role data transfer object.
    - `id` string — Represents role identifier across the system.
    - `name` string — Represents a role name.
    - `source` AuthorizationSourceDtoV1 — Represents an authorization data transfer object.
      - `id` string — Represents authorization source identifier across the system.
      - `type` 'USER_GROUP' — Represents a valid authorization source type.
  - `userId` string — Represents workspace identifier across the system.
  - `workspaceId` string — Represents workspace identifier across the system.

---

[API](https://skmtc.dev/clockify/apis/clockify-api.md) · [All operations](https://skmtc.dev/clockify/apis/clockify-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/clockify/clockify-api/revisions/a5b636acbcd8/schema)
