Class InvitesClient

java.lang.Object
io.github.stefanbratanov.jvm.openai.InvitesClient

public final class InvitesClient extends Object
Invite and manage invitations for an organization. Invited users are automatically added to the Default project.

Based on Invites

  • Method Details

    • listInvites

      public InvitesClient.PaginatedInvites listInvites(Optional<String> after, Optional<Integer> limit)
      Returns a list of invites in the organization.
      Parameters:
      after - A cursor for use in pagination. after is an object ID that defines your place in the list.
      limit - A limit on the number of objects to be returned.
      Throws:
      OpenAIException - in case of API errors
    • createInvite

      public Invite createInvite(InviteRequest request)
      Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
      Throws:
      OpenAIException - in case of API errors
    • retrieveInvite

      public Invite retrieveInvite(String inviteId)
      Retrieves an invite.
      Parameters:
      inviteId - The ID of the invite to retrieve.
      Throws:
      OpenAIException - in case of API errors
    • deleteInvite

      public DeletionStatus deleteInvite(String inviteId)
      Delete an invite. If the invite has already been accepted, it cannot be deleted.
      Parameters:
      inviteId - The ID of the invite to delete.
      Throws:
      OpenAIException - in case of API errors