Create a waitlist entry
Create a new entry in a waitlist.
Use createWaitlyEntry method
This method creates a new entry in a waitlist. It is useful to add a new entry to your waitlist.
main.tsx
import { createWaitlyClient } from "@go-waitly/waitly-sdk";
const waitly = createWaitlyClient({
apiKey: "you_api_key",
waitlistId: "your_waitlist_id",
});
const entry = await waitly.createWaitlyEntry({
email: "test@test.com",
referredByCode: "1ER765",
utm: {
utm_source: "google",
utm_medium: "cpc",
utm_campaign: "ad_campaign",
},
metadata: {
...metadata,
}
});
Response
The createWaitlyEntry method returns the following response:
Note
The referral_link is only available if the waitlist has a website URL setup.
You can use the referral_link to send a referral link to the user that will be used to gamify your waitlist and increase the number of entries.
You can use the referral_link to send a referral link to the user that will be used to gamify your waitlist and increase the number of entries.
{
"email": "test@test.com",
"referral_code": "1ER765",
"referral_link": "https://yourwebsite.com/?code=1ER765",
}
Types
The createWaitlyEntry method has the following parameters:
export interface WaitlyEntry {
email: string;
referredByCode?: string;
utm?: Record<string, string>;
metadata?: Record<string, unknown>;
}