WorkOS.Organizations (WorkOS SDK for Elixir v3.0.1)

Copy Markdown View Source

Operations for the Organizations API.

Summary

Functions

create_organization(client, params \\ %{}, opts \\ [])

@spec create_organization(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.Organization.t()} | {:error, WorkOS.Error.error()}

Create an Organization

Creates a new organization in the current environment.

Parameters

delete_organization(client, id, opts \\ [])

@spec delete_organization(WorkOS.Client.t(), String.t(), keyword()) ::
  {:ok, term()} | {:error, WorkOS.Error.error()}

Delete an Organization

Permanently deletes an organization in the current environment. It cannot be undone.

Parameters

get_audit_log_configuration(client, id, opts \\ [])

@spec get_audit_log_configuration(WorkOS.Client.t(), String.t(), keyword()) ::
  {:ok, WorkOS.AuditLogConfiguration.t()} | {:error, WorkOS.Error.error()}

Get Audit Log Configuration

Get the unified view of audit log trail and stream configuration for an organization.

Parameters

get_organization(client, id, opts \\ [])

@spec get_organization(WorkOS.Client.t(), String.t(), keyword()) ::
  {:ok, WorkOS.Organization.t()} | {:error, WorkOS.Error.error()}

Get an Organization

Get the details of an existing organization.

Parameters

get_organization_by_external_id(client, external_id, opts \\ [])

@spec get_organization_by_external_id(WorkOS.Client.t(), String.t(), keyword()) ::
  {:ok, WorkOS.Organization.t()} | {:error, WorkOS.Error.error()}

Get an Organization by External ID

Get the details of an existing organization by an external identifier.

Parameters

list_authorized_applications(client, organization_id, params \\ %{}, opts \\ [])

@spec list_authorized_applications(WorkOS.Client.t(), String.t(), map(), keyword()) ::
  {:ok,
   WorkOS.Page.t(WorkOS.OrganizationAuthorizedConnectApplicationListData.t())}
  | {:error, WorkOS.Error.error()}

List authorized applications

Get a list of all Connect applications that users in the organization have authorized.

Parameters

  • organization_id — The ID of the organization.
  • params — query parameters: :before, :after_, :limit, :order
  • opts — per-request options (see WorkOS.Client.request/5)

list_organizations(client, params \\ %{}, opts \\ [])

@spec list_organizations(WorkOS.Client.t(), map(), keyword()) ::
  {:ok, WorkOS.Page.t(WorkOS.Organization.t())} | {:error, WorkOS.Error.error()}

List Organizations

Get a list of all of your existing organizations matching the criteria specified.

Parameters

  • params — query parameters: :before, :after_, :limit, :order, :domains, :search
  • opts — per-request options (see WorkOS.Client.request/5)

update_organization(client, id, params \\ %{}, opts \\ [])

@spec update_organization(WorkOS.Client.t(), String.t(), map(), keyword()) ::
  {:ok, WorkOS.Organization.t()} | {:error, WorkOS.Error.error()}

Update an Organization

Updates an organization in the current environment.

Parameters