View Source OpenAi.Invites (OpenAI REST API Client v1.0.0)

Provides API endpoints related to invites

Summary

Functions

Delete an invite. If the invite has already been accepted, it cannot be deleted.

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

Returns a list of invites in the organization.

Functions

Link to this function

delete_invite(invite_id, opts \\ [])

View Source
@spec delete_invite(invite_id :: String.t(), opts :: keyword()) ::
  {:ok, OpenAi.Invite.DeleteResponse.t()} | {:error, OpenAi.Error.error()}

Delete an invite. If the invite has already been accepted, it cannot be deleted.

Link to this function

invite_user(body, opts \\ [])

View Source
@spec invite_user(body :: OpenAi.Invite.Request.t(), opts :: keyword()) ::
  {:ok, OpenAi.Invite.t()} | {:error, OpenAi.Error.error()}

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

Link to this function

list_invites(opts \\ [])

View Source
@spec list_invites(opts :: keyword()) ::
  {:ok, OpenAi.Invite.ListResponse.t()} | {:error, OpenAi.Error.error()}

Returns a list of invites in the organization.

Options

  • limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

  • after: A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

Link to this function

retrieve_invite(invite_id, opts \\ [])

View Source
@spec retrieve_invite(invite_id :: String.t(), opts :: keyword()) ::
  {:ok, OpenAi.Invite.t()} | {:error, OpenAi.Error.error()}

Retrieves an invite.