Skip to main content

updateOrganizationDomain()

Updates a Verified Domain for the given Organization.

Returns the updated OrganizationDomain object.

function updateOrganizationDomain(params: UpdateOrganizationDomainParams): Promise<OrganizationDomain>
  • Name
    domainId
    Type
    string
    Description

    The ID of the domain to update.

  • Name
    organizationId
    Type
    string
    Description

    The ID of the Organization to update the domain for.

Note

Using clerkClient varies based on the SDK you're using. Refer to the overview for usage details, including guidance on how to access the userId and other properties.

const organizationId = 'org_123'
const domainId = 'domain_123'
const enrollmentMode = 'automatic_invitation'

const response = await clerkClient.organizations.updateOrganizationDomain({
  organizationId,
  domainId,
  enrollmentMode,
})

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint PATCH/organizations/{organization_id}/domains/{domain_id}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on