API Documentation
Our REST API lets you manage your waitlist programmatically. Use our official client libraries or make direct HTTP requests.
Authentication
All API requests require authentication using your API key. You can find your API key in the dashboard settings.
// Initialize the client with your API key
const waitlist = new WaitlistAPI('YOUR_API_KEY');Keep your API key secure and never expose it in client-side code.
When making direct API calls, include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYAPI Reference
Direct API Calls
Waitlist Management
Create Waitlist
Create a new waitlist for your product or service.
Endpoint: /api/waitlist
// Create a new waitlist
const response = await fetch('/api/waitlist', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
name: 'Product Launch',
description: 'Waitlist for our new product launch'
})
});
const waitlist = await response.json();Get Waitlists
Retrieve all waitlists for your account.
Endpoint: /api/waitlist
// Get all your waitlists
const response = await fetch('/api/waitlist', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const waitlists = await response.json();Update Waitlist
Update an existing waitlist's details.
Endpoint: /api/waitlist?id=YOUR_WAITLIST_ID
// Update a waitlist
const response = await fetch('/api/waitlist?id=YOUR_WAITLIST_ID', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
name: 'Updated Product Launch',
description: 'Updated description'
})
});
const updatedWaitlist = await response.json();Delete Waitlist
Delete a waitlist and all its members.
Endpoint: /api/waitlist?id=YOUR_WAITLIST_ID
// Delete a waitlist
const response = await fetch('/api/waitlist?id=YOUR_WAITLIST_ID', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});Waitlist Statistics
Get detailed statistics for a specific waitlist.
Endpoint: /api/waitlist/stats?waitlistId=YOUR_WAITLIST_ID
// Get statistics for a waitlist
const response = await fetch('/api/waitlist/stats?waitlistId=YOUR_WAITLIST_ID', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const stats = await response.json();Member Management
Add Member
Add a new member to a waitlist.
Endpoint: /api/waitlist/members
// Add a member to a waitlist
const response = await fetch('/api/waitlist/members', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
waitlistId: 'YOUR_WAITLIST_ID',
email: 'user@example.com',
name: 'John Doe'
})
});
const member = await response.json();Get Members
Retrieve all members of a waitlist.
Endpoint: /api/waitlist/members?waitlistId=YOUR_WAITLIST_ID
// Get all members of a waitlist
const response = await fetch('/api/waitlist/members?waitlistId=YOUR_WAITLIST_ID', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const members = await response.json();Delete Member
Remove a member from a waitlist.
Endpoint: /api/waitlist/members?email=user@example.com&waitlistId=YOUR_WAITLIST_ID
// Remove a member from a waitlist
const response = await fetch('/api/waitlist/members?email=user@example.com&waitlistId=YOUR_WAITLIST_ID', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});Webhooks
Configure webhooks in your dashboard to receive real-time updates when users join or leave your waitlist.
// Example webhook payload
{
"event": "user.joined",
"data": {
"email": "user@example.com",
"name": "John Doe",
"position": 42,
"joinedAt": "2024-03-21T15:30:00Z",
"metadata": {
"company": "Acme Inc",
"role": "CEO"
}
}
}Rate Limits
- Free tier: 100 requests per minute
- Pro tier: 1,000 requests per minute
- Enterprise tier: Custom limits available