Skip to Content
You are viewing a beta version of Clerk Docs
Visit the latest docs
Clerk logo

Clerk Docs

Ctrl + K
Go to clerk.com

OrganizationDomain

The OrganizationDomain object is the model around an organization domain.

Properties

NameTypeDescription
idstringA unique identifier for this organization domain.
namestringThe name for this organization domain (e.g. example.com).
organizationIdstringThe 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.
verificationOrganizationDomainVerificationThe object that describes the status of the verification process of the domain.
affiliationEmailAddressstring | nullThe email address that was used to verify this organization domain.
totalPendingInvitationsnumberThe number of total pending invitations sent to emails that match the domain name.
totalPendingSuggestionsnumberThe number of total pending suggestions sent to emails that match the domain name.
createdAtDateThe date and time the organization domain was created.
updatedAtDateThe date and time the organization domain was updated.

OrganizationDomainVerification

NameTypeDescription
status'unverified' | 'verified'The status of the verification process.
strategy'email_code'A string that indicates strategy of the verification.
attemptsnumberA number that indicates how many attempts have occured in order to verify the domain.
expiresAtDateThe 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

NameTypeDescription
affiliationEmailAddressstringAn email address that is affiliated with the domain name (e.g. user@example.com).

prepareAffiliationVerification() returns

TypeDescription
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

NameTypeDescription
codestringThe one-time code that was sent to the user as part of this verification step.

attemptAffiliationVerification() returns

TypeDescription
Promise<OrganizationDomain>This method returns a Promise which resolves with an OrganizationDomain object.

Last updated on February 21, 2024

What did you think of this content?

Clerk © 2024