View Source WorkOS.Organizations (WorkOS SDK for Elixir v1.1.0)

Manage Organizations in WorkOS.

@see https://workos.com/docs/reference/organization

Summary

Functions

Link to this function

create_organization(client \\ WorkOS.client(), opts)

View Source

Creates an organization.

Parameter options:

  • :name - A descriptive name for the Organization. This field does not need to be unique. (required)
  • :domains - The domains of the Organization.
  • :allow_profiles_outside_organization - Whether the Connections within this Organization should allow Profiles that do not have a domain that is present in the set of the Organization’s User Email Domains.
  • :idempotency_key - A unique string as the value. Each subsequent request matching this unique string will return the same response.
Link to this function

delete_organization(client \\ WorkOS.client(), organization_id)

View Source
@spec delete_organization(WorkOS.Client.t(), String.t()) ::
  WorkOS.Client.response(nil)

Deletes an organization.

Link to this function

get_organization(client \\ WorkOS.client(), organization_id)

View Source

Gets an organization given an ID.

Link to this function

list_organizations(opts \\ %{})

View Source
Link to this function

list_organizations(client, opts)

View Source

Lists all organizations.

Parameter options:

  • :domains - The domains of an Organization. Any Organization with a matching domain will be returned.
  • :limit - Maximum number of records to return. Accepts values between 1 and 100. Default is 10.
  • :after - Pagination cursor to receive records after a provided event ID.
  • :before - An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
  • :order - Order the results by the creation time. Supported values are "asc" and "desc" for showing older and newer records first respectively.
Link to this function

update_organization(client \\ WorkOS.client(), organization_id, opts)

View Source

Updates an organization.

Parameter options:

  • :organization - Unique identifier of the Organization. (required)
  • :name - A descriptive name for the Organization. This field does not need to be unique. (required)
  • :domains - The domains of the Organization.
  • :allow_profiles_outside_organization - Whether the Connections within this Organization should allow Profiles that do not have a domain that is present in the set of the Organization’s User Email Domains.