Modify user
client.admin.organization.users.update(stringuserID, UserUpdateParams { developer_persona, role, role_id, technical_level } body, RequestOptionsoptions?): OrganizationUser { id, added_at, object, 13 more }
POST/organization/users/{user_id}
Modify user
import OpenAI from 'openai';
const client = new OpenAI({
adminAPIKey: process.env['OPENAI_ADMIN_KEY'], // This is the default and can be omitted
});
const organizationUser = await client.admin.organization.users.update('user_id');
console.log(organizationUser.id);{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}
Returns Examples
{
"object": "organization.user",
"id": "user_abc",
"name": "First Last",
"email": "user@example.com",
"role": "owner",
"added_at": 1711471533
}