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

createAllowlistIdentifier()

Adds a new identifier to the allowlist.

function createAllowlistIdentifier: (params: AllowlistIdentifierCreateParams) => Promise<AllowlistIdentifier>;

AllowlistIdentifierCreateParams

NameTypeDescription
identifierstringThe identifier can be: a phone number in international E.164(opens in a new tab) format, an email address, or a wildcard email address (*.domain.com). Use this identifier value to allow any email address in a particular email domain.
notifybooleanWhether to notify the owner of the identifier. The notify property is not available for wildcard identifiers.

createAllowlistIdentifier() example

const response = await clerkClient.allowlistIdentifiers.createAllowlistIdentifier({ identifier: 'test@example.com', notify: false, }); console.log(response); /* _AllowlistIdentifier { id: 'alid_2b3VjS02AsRMoTcyLzMJ7mZvz4J', identifier: 'test@example.com', createdAt: 1705443883820, updatedAt: 1705443883820, invitationId: undefined } */

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/allowlist-identifiers. See the BAPI reference(opens in a new tab) for more details.

Last updated on August 16, 2023

What did you think of this content?

Clerk © 2024