获取用户
get /v1/organizations/users/{user_id}
获取用户
路径参数
-
user_id: string用户的 ID。
返回值
-
User object { id, added_at, email, 3 more }-
id: string用户的 ID。
-
added_at: stringRFC 3339 日期时间字符串,表示用户加入组织的时间。
-
email: string用户的邮箱。
-
name: string用户的姓名。
-
role: "user" or "developer" or "billing" or 2 more用户在组织中的角色。
-
"user" -
"developer" -
"billing" -
"admin" -
"claude_code_user"
-
-
type: "user"对象类型。
对于用户,始终为
"user"。"user"
-
示例
curl https://api.anthropic.com/v1/organizations/users/$USER_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
响应
{
"id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
"added_at": "2024-10-30T23:58:27.427722Z",
"email": "user@emaildomain.com",
"name": "Jane Doe",
"role": "user",
"type": "user"
}