更新当前用户
OpenAPI 契约
- 方法
- PATCH
- 路径
/api/v1/user/me- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 429 500
请求与响应 Schema
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/UpdateProfileRequest"
}
},
"responses": {
"200": {
"description": "Account profile updated",
"content": {
"application/json": {
"$ref": "#/components/schemas/UserResponse"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}PATCH /api/v1/user/me 仅限 JWT。会更新所有已提供的资料字段:displayName(最多 80)、locale(en、en-US 或等效的双字母语言/地区形式;最多 16)、shareToExplore、defaultSharingPreferences(最多 500)、twoFactorEnabled、commentNotificationsEnabled、非负 creditCeiling 和非空的 workspaceName(最多 100)。响应为更新后的资料。
nfy_ 自动化密钥不能更新账户设置。空白的可选文本会被取消设置,但已提供的 workspaceName 不得为空白。校验错误会被拒绝。
http
PATCH /api/v1/user/me
Authorization: Bearer <access token>
Content-Type: application/json