---
title: "Grant the role to the user"
method: POST
path: "/cm/v1/auth/roles/grant"
tags: ["Role"]
---

# Grant the role to the user

`POST /cm/v1/auth/roles/grant`

Grant the Role to the user.

## Request body

- MessagesGrantRoleRequest
  - `user_id` string, required — The user ID.
  - `role` DspRole, required — Role that user can have. Role is bound to resource.
    - `type` 'WORKPLACE_OWNER' | 'AD_ACCOUNT_OWNER' | 'AD_ACCOUNT_MEMBER' | 'AD_ACCOUNT_VIEWER' — - WORKPLACE_OWNER: Workplace owner represents a user who can do anything in a given workplace. - AD_ACCOUNT_OWNER: Ad account owner represents a user who can do anything in a given ad account. - AD_ACCOUNT_MEMBER: Ad account member can view all users of the Ad Account. Can invite new users as Ad Account Member or Ad Account Viewer Can edit your own information (ex: name) Can create and edit ad campaigns - AD_ACCOUNT_VIEWER: Ad account Viewer role offers a limited set of permissions that allows users only to read the basic information of the resources.
    - `workplace_id` string — The workplace bound to the role.
    - `ad_account_id` string — The ad account id bound to role.
    - `exchange_id` string — The exchange id bound to role.

## Response `200`

A successful response.

- MessagesGrantRoleResponse

## Other responses

- `default` — Error. Detailed cause can be found in the `details` field.

---

[API](https://skmtc.net/moloco/apis/moloco-ads-campaign-management-api.md) · [All operations](https://skmtc.net/moloco/apis/moloco-ads-campaign-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/moloco/moloco-ads-campaign-management-api/revisions/5c85d0910ac0/schema)
