---
title: "Update My Role"
method: PUT
path: "/api/v1/auth/me/role"
tags: ["认证"]
---

# Update My Role

`PUT /api/v1/auth/me/role`

## 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/auth/me/role`
- Auth: none declared

新用户验证邮箱后，在 OAuth 角色选择页选定角色时由 MCP 调用。

用 MCP 内部密钥 + 一次性角色票据双因素认证（而非仅凭内部密钥），
因为此刻用户尚未获得 OAuth token。票据由 register-or-login 对新用户
签发，短时效、存哈希、用后即焚；仅持内部密钥无法再任意修改任意用户角色。

切换角色时会补建对应的 profile（默认注册建的是 candidate profile）。

## Headers

- `X-MCP-Internal-Secret` string, nullable

## Request body

- UpdateRoleRequest
  - `user_id` string, uuid, required
  - `role` string, required
  - `company_name` string, nullable
  - `ticket` string, nullable

## Response `200`

Successful Response

- RegisterOrLoginResponse
  - `user_id` string, required
  - `email` string, required
  - `role` string, required
  - `email_verified` boolean, required
  - `is_new_user` boolean, required
  - `message` string, required
  - `role_change_ticket` string, nullable

## 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)
