---
title: "Assign Role"
method: POST
path: "/api/v1/community/roles/assign"
tags: ["community"]
---

# Assign Role

`POST /api/v1/community/roles/assign`

## Request

- Base URL: `https://api.hipowork.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hipowork.com/api/v1/community/roles/assign`
- Auth: OAuth 2 (password, token URL `/api/v1/auth/oauth/token`)

管理员指定他人社区角色。

约束：不能改自己的角色（防止唯一管理员把自己降级后无人可管）。

## Request body

- RoleAssign
  - `user_id` string, required: 目标用户 ID
  - `role` string, required: member / moderator / admin

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/hipowork/apis/hipo-work-ai-recruitment-platform.md) · [All operations](https://skmtc.dev/hipowork/apis/hipo-work-ai-recruitment-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/hipowork/apis/hipo-work-ai-recruitment-platform/revisions/de21a6c57062?raw)
