Modifies a user's role in the project.

POST /organization/projects/{project_id}/users/{user_id}

Path parameters

  • project_id string Required

    The ID of the project.

  • user_id string Required

    The ID of the user.

application/json

Body Required

The project user update request payload.

  • role string Required

    owner or member

    Values are owner or member.

Responses

  • 200 application/json

    Project user's role updated successfully.

    Hide response attributes Show response attributes object
    • object string Required

      The object type, which is always organization.project.user

      Value is organization.project.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 member

      Values are owner or member.

    • added_at integer Required

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

  • 400 application/json

    Error response for various conditions.

    Hide response attribute Show response attribute object
    • error object Required
      Hide error attributes Show error attributes object
      • code string | null Required
      • message string Required
      • param string | null Required
      • type string Required
POST /organization/projects/{project_id}/users/{user_id}
curl \
 --request POST 'https://api.openai.com/v1/organization/projects/{project_id}/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.project.user",
  "id": "string",
  "name": "string",
  "email": "string",
  "role": "owner",
  "added_at": 42
}
Response examples (400)
{
  "error": {
    "code": "string",
    "message": "string",
    "param": "string",
    "type": "string"
  }
}