Docs

createAllowlistIdentifier()

Adds a new identifier to the allowlist.

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

    The identifier to be added in the allowlist. Can be an email address, a phone number in international E.164 format, a domain, or a web3 wallet.

  • Name
    notify
    Type
    boolean
    Description

    Whether the given identifier will receive an invitation to join the application. Note that this only works for email address and phone number identifiers. Not available for wildcard identifiers or web3 wallets. Defaults to true.

const response = await clerkClient.allowlistIdentifiers.createAllowlistIdentifier({
  identifier: 'test@example.com',
  notify: false,
});

console.log(response);
/*
_AllowlistIdentifier {
  id: 'alid_123',
  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 for more details.

Feedback

What did you think of this content?