Waitlist

Documentation

Everything you need to integrate Waitlist into your product.

Overview

Waitlist lets you create and manage email waitlists for your products. Once you create a waitlist, you get an API key and an embeddable form. Use either approach to capture signups from your users, then track them in your dashboard with real-time analytics.

Getting started

  1. Create an account — Sign up and verify your email address.
  2. Create a waitlist — From your dashboard, click "New waitlist" and give it a name.
  3. Integrate — Use the REST API with your API key, or copy the embed snippet into your site.
  4. Track signups — View submissions, daily trends, and growth metrics in your dashboard.

API Reference

Authentication

All API requests require your waitlist API key passed via the x-api-key header. You can find your API key on the waitlist detail page in your dashboard.

POST/api/public/waitlists/{id}/subscribe

Add an email to your waitlist.

Headers

HeaderValue
Content-Typeapplication/json
x-api-keyYour API key

Request body

{
  "email": "user@example.com"
}

Response

// 201 Created
{
  "message": "Successfully joined the waitlist",
  "unsubscribeToken": "a1b2c3..."
}

// 200 OK (already subscribed)
{
  "message": "Already subscribed"
}

Save the unsubscribeTokenfrom the 201 response. You'll need it to let this subscriber unsubscribe later.

Example — cURL

curl -X POST https://waitlist.trekker.cloud/api/public/waitlists/{id}/subscribe \
  -H "Content-Type: application/json" \
  -H "x-api-key: wl_your_api_key_here" \
  -d '{"email": "user@example.com"}'

Example — JavaScript (fetch)

const response = await fetch(
  "https://waitlist.trekker.cloud/api/public/waitlists/{id}/subscribe",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": "wl_your_api_key_here",
    },
    body: JSON.stringify({ email: "user@example.com" }),
  }
);

const data = await response.json();
console.log(data.message);
GET/api/public/waitlists/{id}/entries

Retrieve a paginated list of all subscribers on your waitlist. Requires your API key.

Headers

HeaderValue
x-api-keyYour API key (required)

Query parameters

ParamDefaultDescription
page1Page number
limit20Results per page (max 100)

Response

{
  "entries": [
    {
      "id": "clx...",
      "email": "user@example.com",
      "createdAt": "2026-04-05T12:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 42,
    "totalPages": 3
  }
}

Example — cURL

curl https://waitlist.trekker.cloud/api/public/waitlists/{id}/entries?page=1&limit=20 \
  -H "x-api-key: wl_your_api_key_here"

Example — JavaScript (fetch)

const response = await fetch(
  "https://waitlist.trekker.cloud/api/public/waitlists/{id}/entries?page=1&limit=20",
  {
    headers: {
      "x-api-key": "wl_your_api_key_here",
    },
  }
);

const { entries, pagination } = await response.json();
console.log(`Page ${pagination.page} of ${pagination.totalPages}`);
entries.forEach((e) => console.log(e.email, e.createdAt));

Unsubscribe

Remove a subscriber from your waitlist using the unsubscribeToken returned when they subscribed. No API key required. Two methods are available:

GET/api/public/waitlists/{id}/unsubscribe?token={token}

Best for email links. Build an unsubscribe URL and put it in your emails so subscribers can click to opt out.

Example link

https://waitlist.trekker.cloud/api/public/waitlists/{id}/unsubscribe?token=a1b2c3...
POST/api/public/waitlists/{id}/unsubscribe

Best for programmatic use. Send the token in the request body.

Request body

{
  "token": "a1b2c3..."
}

Response (both methods)

// 200 OK
{
  "message": "Successfully unsubscribed"
}

// 404 Not Found
{
  "error": "Invalid unsubscribe link"
}
POST/api/public/waitlists/{id}/send-email

Send an email to all (or a segment of) your waitlist subscribers. Requires your API key and a configured email integration (set up via the dashboard under Emails → Settings).

Headers

HeaderValue
Content-Typeapplication/json
x-api-keyYour API key (required)

Request body

{
  "subject": "We're launching!",
  "htmlBody": "<h1>Big news</h1><p>We are live.</p>",
  "segmentFilter": {
    "signedUpAfter": "2026-01-01T00:00:00Z",
    "signedUpBefore": "2026-04-01T00:00:00Z"
  }
}

segmentFilter is optional. Omit it to send to all subscribers.

Response

// 200 OK
{
  "campaignId": "clxyz...",
  "sent": 42,
  "failed": 0
}

Example — cURL

curl -X POST https://waitlist.trekker.cloud/api/public/waitlists/{id}/send-email \
  -H "Content-Type: application/json" \
  -H "x-api-key: wl_your_api_key_here" \
  -d '{
    "subject": "We are launching!",
    "htmlBody": "<h1>Big news</h1><p>We are live.</p>"
  }'

Example — JavaScript (fetch)

const response = await fetch(
  "https://waitlist.trekker.cloud/api/public/waitlists/{id}/send-email",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": "wl_your_api_key_here",
    },
    body: JSON.stringify({
      subject: "We are launching!",
      htmlBody: "<h1>Big news</h1><p>We are live.</p>",
    }),
  }
);

const { campaignId, sent, failed } = await response.json();
console.log(`Campaign ${campaignId}: ${sent} sent, ${failed} failed`);

Full flow example

Here's a typical integration: subscribe a user, store the token, then use it to let them unsubscribe.

// 1. Subscribe a user
const subRes = await fetch(
  "https://waitlist.trekker.cloud/api/public/waitlists/{id}/subscribe",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": "wl_your_api_key_here",
    },
    body: JSON.stringify({ email: "user@example.com" }),
  }
);
const { unsubscribeToken } = await subRes.json();

// 2. Store the token (e.g. in your database alongside the user)

// 3. Build an unsubscribe link for your emails
const unsubscribeUrl =
  `https://waitlist.trekker.cloud/api/public/waitlists/{id}/unsubscribe?token=${unsubscribeToken}`;

// 4. Or unsubscribe programmatically
await fetch(
  "https://waitlist.trekker.cloud/api/public/waitlists/{id}/unsubscribe",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ token: unsubscribeToken }),
  }
);

Embed form

If you prefer not to use the API directly, you can embed a ready-made signup form on any website using an iframe. Copy the embed snippet from your waitlist detail page and paste it into your HTML.

Example

<iframe
  src="https://waitlist.trekker.cloud/embed/{waitlist-id}"
  width="100%"
  height="180"
  frameborder="0"
  style="border:none;border-radius:12px;"
></iframe>

The form handles validation, loading states, and success messages automatically. No JavaScript setup required on your end.

Error codes

StatusMeaning
400Invalid request body (e.g. missing or invalid email)
404Waitlist not found or API key doesn't match
500Internal server error — please try again later
Need help? Reach out to support.