Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.

POST /organization/invites
application/json

Body Required

The invite request payload.

  • email string Required

    Send an email to this address

  • role string Required

    owner or reader

    Values are reader or owner.

  • projects array[object]

    An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior.

    Hide projects attributes Show projects attributes object
    • id string Required

      Project's public ID

    • role string Required

      Project membership role

      Values are member or owner.

Responses

  • 200 application/json

    User invited successfully.

    Hide response attributes Show response attributes object
    • object string Required

      The object type, which is always organization.invite

      Value is organization.invite.

    • id string Required

      The identifier, which can be referenced in API endpoints

    • email string Required

      The email address of the individual to whom the invite was sent

    • role string Required

      owner or reader

      Values are owner or reader.

    • status string Required

      accepted,expired, or pending

      Values are accepted, expired, or pending.

    • invited_at integer Required

      The Unix timestamp (in seconds) of when the invite was sent.

    • expires_at integer Required

      The Unix timestamp (in seconds) of when the invite expires.

    • accepted_at integer

      The Unix timestamp (in seconds) of when the invite was accepted.

    • projects array[object]

      The projects that were granted membership upon acceptance of the invite.

      Hide projects attributes Show projects attributes object
      • id string

        Project's public ID

      • role string

        Project membership role

        Values are member or owner.

POST /organization/invites
curl \
 --request POST 'https://api.openai.com/v1/organization/invites' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"email":"string","role":"reader","projects":[{"id":"string","role":"member"}]}'
Request examples
{
  "email": "string",
  "role": "reader",
  "projects": [
    {
      "id": "string",
      "role": "member"
    }
  ]
}
Response examples (200)
{
  "object": "organization.invite",
  "id": "string",
  "email": "string",
  "role": "owner",
  "status": "accepted",
  "invited_at": 42,
  "expires_at": 42,
  "accepted_at": 42,
  "projects": [
    {
      "id": "string",
      "role": "member"
    }
  ]
}