View Source WorkOS.Organizations (WorkOS SDK for Elixir v1.1.0)
Manage Organizations in WorkOS.
Summary
Functions
Creates an organization.
Deletes an organization.
Gets an organization given an ID.
Lists all organizations.
Updates an organization.
Functions
@spec create_organization(WorkOS.Client.t(), map()) :: WorkOS.Client.response(WorkOS.Organizations.Organization.t())
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.
@spec delete_organization(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(nil)
Deletes an organization.
@spec get_organization(WorkOS.Client.t(), String.t()) :: WorkOS.Client.response(WorkOS.Organizations.Organization.t())
Gets an organization given an ID.
@spec list_organizations(map()) :: WorkOS.Client.response(WorkOS.List.t(WorkOS.Organizations.Organization.t()))
@spec list_organizations(WorkOS.Client.t(), map()) :: WorkOS.Client.response(WorkOS.List.t(WorkOS.Organizations.Organization.t()))
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@spec update_organization(WorkOS.Client.t(), String.t(), map()) :: WorkOS.Client.response(WorkOS.Organizations.Organization.t())
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.