Waitlist methods
These methods on the Clerk
class allow you to add users to your waitlist.
The following example assumes:
- You followed the quickstart to add Clerk to your JavaScript app.
- You set your sign-up mode to Waitlist.
joinWaitlist()
Create a new waitlist entry programatically.
function joinWaitlist({ emailAddress }: JoinWaitlistParams): Promise<Waitlist>
- Name
emailAddress
- Type
string
- Description
The email address of the user you want to add in the waitlist.
import { Clerk } from '@clerk/clerk-js'
// Initialize Clerk with your Clerk Publishable Key
const clerk = new Clerk('YOUR_PUBLISHABLE_KEY')
await clerk.load()
const joinWaitlistButton = document.getElementById('join-waitlist-button')
joinWaitlistButton.addEventListener('click', () => {
clerk
.joinWaitlist({ emailAddress: 'user@example.com' })
.then((res) => console.log(res))
.catch((error) => console.log('An error occurred:', error.errors))
})
Feedback
Last updated on