Modify user

POSThttps:/api.openai.com/v1/organization/users/{user_id}

Modifies a user's role in the organization.

Path parameters

  • user_id
    string
    Required
    The ID of the user.

Request body

  • role
    string
    Required

    owner or reader

    • owner
      string
    • reader
      string

Response

The updated User object.

Example request
1
curl -X POST https://api.openai.com/v1/organization/users/user_abc \
2
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
3
-H "Content-Type: application/json" \
4
-d '{
5
"role": "owner"
6
}'
Example response
1
{
2
"object": "organization.user",
3
"id": "user_abc",
4
"name": "First Last",
5
"email": "user@example.com",
6
"role": "owner",
7
"added_at": 1711471533
8
}
Built with