logowaitly

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:


{
  "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>;
}