Adds a user to the project. Users must already be members of the organization to be added to a project.

POST /organization/projects/{project_id}/users

Path parameters

  • project_id string Required

    The ID of the project.

application/json

Body Required

The project user create request payload.

  • user_id string Required

    The ID of the user.

  • role string Required

    owner or member

    Values are owner or member.

Responses

  • 200 application/json

    User added to project 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
curl \
 --request POST 'https://api.openai.com/v1/organization/projects/{project_id}/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"user_id":"string","role":"owner"}'
Request examples
{
  "user_id": "string",
  "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"
  }
}