OrganizationDomain
The OrganizationDomain
object is the model around an organization domain.
Properties
Name | Type | Description |
---|---|---|
id | string | A unique identifier for this organization domain. |
name | string | The name for this organization domain (e.g. example.com). |
organizationId | string | The organization ID of the organization this domain is for. |
enrollmentMode | 'manual_invitation' | 'automatic_invitation' | 'automatic_suggestion' | An enrollment mode will change how new users join an organization. |
verification | OrganizationDomainVerification | The object that describes the status of the verification process of the domain. |
affiliationEmailAddress | string | null | The email address that was used to verify this organization domain. |
totalPendingInvitations | number | The number of total pending invitations sent to emails that match the domain name. |
totalPendingSuggestions | number | The number of total pending suggestions sent to emails that match the domain name. |
createdAt | Date | The date and time the organization domain was created. |
updatedAt | Date | The date and time the organization domain was updated. |
OrganizationDomainVerification
Name | Type | Description |
---|---|---|
status | 'unverified' | 'verified' | The status of the verification process. |
strategy | 'email_code' | A string that indicates strategy of the verification. |
attempts | number | A number that indicates how many attempts have occured in order to verify the domain. |
expiresAt | Date | The expiration date and time of the verification. |
Methods
delete()
Deletes the organization domain and removes it from the organization.
function delete: () => Promise<void>;
prepareAffiliationVerification()
Begins the verification process of a created organization domain. This is a required step in order to complete the registration of the domain under the organization.
function prepareAffiliationVerification(params: PrepareAffiliationVerificationParams): Promise<OrganizationDomain>;
PrepareAffiliationVerificationParams
Name | Type | Description |
---|---|---|
affiliationEmailAddress | string | An email address that is affiliated with the domain name (e.g. user@example.com). |
prepareAffiliationVerification()
returns
Type | Description |
---|---|
Promise<OrganizationDomain> | A Promise which resolves with an OrganizationDomain object. |
attemptAffiliationVerification()
Attempts to complete the domain verification process. This is a required step in order to complete the registration of a domain under an organization, as the administrator should be verified as a person who is affiliated with that domain.
Make sure that an OrganizationDomain
object already exists before you call this method, by first calling OrganizationDomain.prepareAffiliationVerification
.
function attemptAffiliationVerification(params: AttemptAffiliationVerificationParams): Promise<OrganizationDomain>;
AttemptAffiliationVerificationParams
Name | Type | Description |
---|---|---|
code | string | The one-time code that was sent to the user as part of this verification step. |
attemptAffiliationVerification()
returns
Type | Description |
---|---|
Promise<OrganizationDomain> | This method returns a Promise which resolves with an OrganizationDomain object. |
Last updated on February 21, 2024