Skip to main content

createAllowlistIdentifier()

Creates a new allowlist identifier.

Returns the created AllowlistIdentifier object.

function createAllowlistIdentifier(params: AllowlistIdentifierCreateParams): Promise<AllowlistIdentifier>
  • Name
    identifier
    Type
    string
    Description

    The identifier to add to the allowlist. Can be an email address, a domain in wildcard email format (e.g. *@example.com), a phone number in international E.164 format (e.g. +15555555555), or a Web3 wallet address.

  • Name
    notify
    Type
    boolean
    Description

    Whether to notify the user that their identifier has been added to the allowlist. Notifies the user if the identifier is an email address or phone number.

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 response = await clerkClient.allowlistIdentifiers.createAllowlistIdentifier({
  identifier: 'test@example.com',
  notify: false,
})

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/allowlist-identifiers. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on