Modifies a user's role in the organization.

POST /organization/users/{user_id}

Path parameters

  • user_id string Required

    The ID of the user.

application/json

Body Required

The new user role to modify. This must be one of owner or member.

  • role string Required

    owner or reader

    Values are owner or reader.

Responses

  • 200 application/json

    User role updated successfully.

    Hide response attributes Show response attributes object
    • object string Required

      The object type, which is always organization.user

      Value is organization.user.

    • id string Required

      The identifier, which can be referenced in API endpoints

    • name string Required

      The name of the user

    • email string Required

      The email address of the user

    • role string Required

      owner or reader

      Values are owner or reader.

    • added_at integer Required

      The Unix timestamp (in seconds) of when the user was added.

POST /organization/users/{user_id}
curl \
 --request POST 'https://api.openai.com/v1/organization/users/{user_id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"role":"owner"}'
Request examples
{
  "role": "owner"
}
Response examples (200)
{
  "object": "organization.user",
  "id": "string",
  "name": "string",
  "email": "string",
  "role": "owner",
  "added_at": 42
}