API Reference / Endpoints

Add Subscriber

The Add Subscriber endpoint allows you to programmatically add new subscribers to your waitlist. This is useful for integrating Waitlister with your existing systems or custom sign-up forms.

Endpoint Details

  • URL: https://waitlister.me/api/v1/waitlist/{waitlist-key}/sign-up
  • Method: POST

Request

Headers

Content-Type: application/json
X-Api-Key: your-api-key

Path Parameters

ParameterDescription
waitlist-keyYour unique waitlist key, found in your waitlist settings

Request Body

{
  "email": "[email protected]",
  "name": "John Doe",
  "phone": "+1234567890",
  "metadata": {
    "referred_by": "happy-star-4f3d",
    "referring_domain": "google.com",
    "custom_field_1": "value1",
    "custom_field_2": "value2"
  }
}

Required Fields

FieldTypeDescription
emailStringThe subscriber's email address

Optional Fields

FieldTypeDescription
nameStringThe subscriber's name
phoneStringThe subscriber's phone number
metadataObjectAdditional information about the subscriber
metadata.referred_byStringReferral code of the user who referred this subscriber
metadata.referring_domainStringDomain that referred the subscriber (overrides HTTP referrer)
metadata.*AnyAny additional custom fields you want to store with the subscriber

Response

The response format depends on whether your waitlist has double opt-in enabled.

Standard Response (Double Opt-in Disabled) 200

{
  "success": true,
  "is_new_sign_up": true,
  "is_pending_confirmation": false,
  "message": "Successfully signed up",
  "position": 42,
  "points": 50,
  "referral_code": "happy-star-4f3d",
  "sign_up_token": "abc123xyz",
  "redirect_url": "https://waitlister.me/thank-you/waitlist-key/abc123xyz"
}

Double Opt-in Response (Double Opt-in Enabled) 200

When double opt-in is enabled, subscribers must confirm their email before being added to your waitlist.

{
  "success": true,
  "is_new_sign_up": true,
  "is_pending_confirmation": true,
  "message": "Please check your email to confirm your sign-up",
  "redirect_url": "https://waitlister.me/confirm-pending/waitlist-key/confirmation-token"
}

Existing Subscriber Response 200

If the email is already registered:

{
  "success": true,
  "is_new_sign_up": false,
  "is_pending_confirmation": false,
  "message": "Email already registered",
  "position": 42,
  "referral_code": "happy-star-4f3d",
  "sign_up_token": "abc123xyz",
  "redirect_url": "https://waitlister.me/thank-you/waitlist-key/abc123xyz"
}

Pending Confirmation Response (Double Opt-in) 200

If the email already has a pending confirmation:

{
  "success": true,
  "is_new_sign_up": false,
  "is_pending_confirmation": true,
  "message": "Confirmation email already sent. Please check your inbox.",
  "redirect_url": "https://waitlister.me/confirm-pending/waitlist-key/confirmation-token"
}

Response Fields

FieldTypeDescription
successBooleanAlways true for successful responses
is_new_sign_upBooleantrue if this is a new subscriber, false if the email was already registered or pending
is_pending_confirmationBooleantrue if the subscriber needs to confirm their email (double opt-in enabled)
messageStringA human-readable message
positionNumberThe subscriber's position in your waitlist (only present when confirmed)
pointsNumberThe subscriber's points (only present when confirmed)
referral_codeStringThe subscriber's unique referral code (only present when confirmed)
sign_up_tokenStringA unique token for this subscriber (only present when confirmed)
redirect_urlStringURL to redirect the user to. Points to the thank-you page (standard) or confirm-pending page (double opt-in)

Error Responses

Bad Request 400

{
  "statusCode": 400,
  "message": "Valid email is required"
}

Rate Limited 429

{
  "statusCode": 429,
  "message": "Too many sign-up attempts. Please try again later.",
  "data": {
    "retry_after": 3600
  }
}

Common Error Codes

Status CodeDescription
400Invalid email format or missing required field
429Rate limit exceeded
500Internal server error

Examples

Basic Sign-up

curl -X POST "https://waitlister.me/api/v1/waitlist/your-waitlist-key/sign-up" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your-api-key" \
  -d '{
    "email": "[email protected]",
    "name": "John Doe"
  }'

Sign-up with Referral

curl -X POST "https://waitlister.me/api/v1/waitlist/your-waitlist-key/sign-up" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your-api-key" \
  -d '{
    "email": "[email protected]",
    "name": "Jane Smith",
    "metadata": {
      "referred_by": "happy-star-4f3d"
    }
  }'

Sign-up with Custom Fields

curl -X POST "https://waitlister.me/api/v1/waitlist/your-waitlist-key/sign-up" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: your-api-key" \
  -d '{
    "email": "[email protected]",
    "name": "John Doe",
    "metadata": {
      "company": "Acme Inc",
      "role": "Developer",
      "how_they_heard": "Google Search"
    }
  }'

Implementation Notes

Handling the Response

Check the is_pending_confirmation field to determine the appropriate user experience:

const response = await fetch('https://waitlister.me/api/v1/waitlist/your-key/sign-up', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': 'your-api-key'
  },
  body: JSON.stringify({ email: '[email protected]', name: 'John' })
})

const data = await response.json()

if (data.is_pending_confirmation) {
  // Double opt-in: Show "check your email" message
  showMessage('Please check your email to confirm your subscription.')
  // Optionally redirect to the confirm-pending page
  // window.location.href = data.redirect_url
} else {
  // Standard flow: Show success with position
  showMessage(`You're #${data.position} on the waitlist!`)
  // Share the referral code
  showReferralCode(data.referral_code)
}

Double Opt-in Flow

When double opt-in is enabled for your waitlist:

  1. User submits their email via the API
  2. A confirmation email is sent automatically
  3. User clicks the confirmation link in their email
  4. User is added to the waitlist and redirected to the thank-you page
  5. Welcome email is sent (if enabled)

Referral Tracking

When a user signs up through a referral:

  1. Include the referrer's referral code in the metadata.referred_by field
  2. The referrer gets credit once the new subscriber confirms (if double opt-in is enabled) or immediately (if disabled)
  3. The new subscriber gets a unique referral code they can share

Rate Limits

See API Rate Limits for more information.

Get started for free

Start collecting sign ups for your product launch in minutes — no coding required.