[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fapi\u002Fexamples":3},{"_path":4,"title":5,"description":6,"navigation":7,"image":13,"head":18,"body":32},"\u002Fdocs\u002Fapi\u002Fexamples","API Code Examples · Waitlister Documentation","Find practical code examples for integrating with the Waitlister API in different programming languages.",{"title":8,"parent":9,"group":10,"description":11,"order":12},"Code Examples","API Reference","Advanced","Practical examples of integrating with the Waitlister API in different programming languages.",5,{"src":14,"width":15,"height":16,"alt":17},"https:\u002F\u002Ffirebasestorage.googleapis.com\u002Fv0\u002Fb\u002Fwaitinglist-app-c24fc.appspot.com\u002Fo\u002Fdocs-og-image.png?alt=media&token=85e60b24-c882-4f84-aa9e-ef85e1ae4bb5",400,300,"Waitlister API Code Examples",{"meta":19},[20,23,26,29],{"name":21,"content":22},"keywords","api code examples, waitlist integration, javascript api, nodejs api, api implementation",{"name":24,"content":25},"robots","index, follow",{"name":27,"content":28},"author","Waitlister",{"name":30,"content":31},"copyright","© 2026 Waitlister",{"type":33,"children":34,"toc":361},"root",[35,48,55,60,67,74,79,93,99,104,115,121,126,137,143,148,159,165,170,307,313,318],{"type":36,"tag":37,"props":38,"children":39},"element","p",{},[40],{"type":36,"tag":41,"props":42,"children":45},"span",{"className":43},[44],"secondary-heading",[46],{"type":47,"value":9},"text",{"type":36,"tag":49,"props":50,"children":52},"h1",{"id":51},"api-code-examples",[53],{"type":47,"value":54},"API Code Examples",{"type":36,"tag":37,"props":56,"children":57},{},[58],{"type":47,"value":59},"This page provides practical code examples for integrating with the Waitlister API in different programming languages and frameworks. These examples can help you quickly get started with implementing Waitlister in your projects.",{"type":36,"tag":61,"props":62,"children":64},"h2",{"id":63},"javascript-nodejs",[65],{"type":47,"value":66},"JavaScript \u002F Node.js",{"type":36,"tag":68,"props":69,"children":71},"h3",{"id":70},"integration-example-nodejs",[72],{"type":47,"value":73},"Integration Example (Node.js)",{"type":36,"tag":37,"props":75,"children":76},{},[77],{"type":47,"value":78},"This example shows how to create a simple Express server that handles waitlist sign-ups and forwards them to the Waitlister API.",{"type":36,"tag":80,"props":81,"children":87},"pre",{"className":82,"code":84,"language":85,"meta":86},[83],"language-javascript","const express = require('express');\nconst bodyParser = require('body-parser');\nconst fetch = require('node-fetch');\n\nconst app = express();\napp.use(bodyParser.json());\napp.use(express.static('public'));\n\n\u002F\u002F Configuration\nconst config = {\n  waitlistKey: 'your-waitlist-key',\n  apiKey: 'your-api-key'\n};\n\n\u002F\u002F Serve a simple HTML form\napp.get('\u002F', (req, res) => {\n  res.sendFile(__dirname + '\u002Fpublic\u002Findex.html');\n});\n\n\u002F\u002F Handle sign-up form submission\napp.post('\u002Fapi\u002Fsign-up', async (req, res) => {\n  try {\n    const { email, name } = req.body;\n    \n    \u002F\u002F Validate input\n    if (!email) {\n      return res.status(400).json({ success: false, message: 'Email is required' });\n    }\n    \n    \u002F\u002F Forward request to Waitlister API\n    const response = await fetch(`https:\u002F\u002Fwaitlister.me\u002Fapi\u002Fv1\u002Fwaitlist\u002F${config.waitlistKey}\u002Fsign-up`, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson',\n        'X-Api-Key': config.apiKey\n      },\n      body: JSON.stringify({\n        email,\n        name,\n        metadata: {\n          referring_domain: req.get('Referrer') || 'direct',\n          client_ip: req.headers['x-forwarded-for']?.split(',')[0]?.trim() || req.ip\n        }\n      })\n    });\n    \n    const data = await response.json();\n    \n    if (!response.ok) {\n      return res.status(response.status).json(data);\n    }\n    \n    return res.json(data);\n  } catch (error) {\n    console.error('Error adding subscriber:', error);\n    return res.status(500).json({ success: false, message: 'Server error' });\n  }\n});\n\n\u002F\u002F Log views\napp.post('\u002Fapi\u002Flog-view', async (req, res) => {\n  try {\n    const { visitorId } = req.body;\n    \n    \u002F\u002F Forward request to Waitlister API\n    const response = await fetch(`https:\u002F\u002Fwaitlister.me\u002Fapi\u002Fv1\u002Fwaitlist\u002F${config.waitlistKey}\u002Flog-view`, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\u002Fjson',\n        'X-Api-Key': config.apiKey\n      },\n      body: JSON.stringify({\n        visitor_id: visitorId,\n        metadata: {\n          referring_domain: req.get('Referrer') || 'direct'\n        }\n      })\n    });\n    \n    const data = await response.json();\n    \n    if (!response.ok) {\n      return res.status(response.status).json(data);\n    }\n    \n    return res.json(data);\n  } catch (error) {\n    console.error('Error logging view:', error);\n    return res.status(500).json({ success: false, message: 'Server error' });\n  }\n});\n\n\u002F\u002F Start server\nconst PORT = process.env.PORT || 3000;\napp.listen(PORT, () => {\n  console.log(`Server running on port ${PORT}`);\n});\n","javascript","",[88],{"type":36,"tag":89,"props":90,"children":91},"code",{"__ignoreMap":86},[92],{"type":47,"value":84},{"type":36,"tag":68,"props":94,"children":96},{"id":95},"frontend-implementation",[97],{"type":47,"value":98},"Frontend Implementation",{"type":36,"tag":37,"props":100,"children":101},{},[102],{"type":47,"value":103},"This example shows a simple HTML form and JavaScript that works with the above server.",{"type":36,"tag":80,"props":105,"children":110},{"className":106,"code":108,"language":109,"meta":86},[107],"language-html","\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n  \u003Cmeta charset=\"UTF-8\">\n  \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  \u003Ctitle>Join Our Waitlist\u003C\u002Ftitle>\n  \u003Cstyle>\n    body {\n      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n      max-width: 600px;\n      margin: 0 auto;\n      padding: 20px;\n    }\n    .form-group {\n      margin-bottom: 15px;\n    }\n    label {\n      display: block;\n      margin-bottom: 5px;\n    }\n    input {\n      width: 100%;\n      padding: 8px;\n      border: 1px solid #ddd;\n      border-radius: 4px;\n    }\n    button {\n      background-color: #4CAF50;\n      color: white;\n      padding: 10px 15px;\n      border: none;\n      border-radius: 4px;\n      cursor: pointer;\n    }\n    .thank-you {\n      display: none;\n      background-color: #f8f9fa;\n      padding: 20px;\n      border-radius: 4px;\n      margin-top: 20px;\n    }\n  \u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n  \u003Ch1>Join Our Waitlist\u003C\u002Fh1>\n  \n  \u003Cdiv id=\"sign-up-form\">\n    \u003Cdiv class=\"form-group\">\n      \u003Clabel for=\"email\">Email Address\u003C\u002Flabel>\n      \u003Cinput type=\"email\" id=\"email\" required>\n    \u003C\u002Fdiv>\n    \n    \u003Cdiv class=\"form-group\">\n      \u003Clabel for=\"name\">Your Name\u003C\u002Flabel>\n      \u003Cinput type=\"text\" id=\"name\">\n    \u003C\u002Fdiv>\n    \n    \u003Cbutton id=\"submit-btn\">Join Waitlist\u003C\u002Fbutton>\n  \u003C\u002Fdiv>\n  \n  \u003Cdiv id=\"thank-you\" class=\"thank-you\">\n    \u003Ch2>Thank You!\u003C\u002Fh2>\n    \u003Cp>You're #\u003Cspan id=\"position\">\u003C\u002Fspan> in line.\u003C\u002Fp>\n    \u003Cp>Share your unique referral link to move up the waitlist:\u003C\u002Fp>\n    \u003Cinput type=\"text\" id=\"referral-link\" readonly>\n  \u003C\u002Fdiv>\n  \n  \u003Cscript>\n    \u002F\u002F Generate or retrieve visitor ID\n    function getVisitorId() {\n      let visitorId = localStorage.getItem('waitlist_visitor_id');\n      \n      if (!visitorId) {\n        visitorId = 'visitor-' + Math.random().toString(36).substring(2, 15);\n        localStorage.setItem('waitlist_visitor_id', visitorId);\n      }\n      \n      return visitorId;\n    }\n    \n    \u002F\u002F Log view when page loads\n    document.addEventListener('DOMContentLoaded', async () => {\n      const visitorId = getVisitorId();\n      \n      try {\n        await fetch('\u002Fapi\u002Flog-view', {\n          method: 'POST',\n          headers: { 'Content-Type': 'application\u002Fjson' },\n          body: JSON.stringify({ visitorId })\n        });\n      } catch (error) {\n        console.error('Error logging view:', error);\n      }\n    });\n    \n    \u002F\u002F Handle form submission\n    document.getElementById('submit-btn').addEventListener('click', async () => {\n      const email = document.getElementById('email').value;\n      const name = document.getElementById('name').value;\n      \n      if (!email) {\n        alert('Please enter your email address.');\n        return;\n      }\n      \n      try {\n        const response = await fetch('\u002Fapi\u002Fsign-up', {\n          method: 'POST',\n          headers: { 'Content-Type': 'application\u002Fjson' },\n          body: JSON.stringify({ email, name })\n        });\n        \n        const data = await response.json();\n        \n        if (!response.ok) {\n          alert(`Error: ${data.error?.message || 'Something went wrong'}`);\n          return;\n        }\n        \n        \u002F\u002F Show thank you message\n        document.getElementById('sign-up-form').style.display = 'none';\n        document.getElementById('thank-you').style.display = 'block';\n        document.getElementById('position').textContent = data.position;\n        \n        \u002F\u002F Create referral link\n        const referralLink = `${window.location.origin}?ref=${data.referral_code}`;\n        document.getElementById('referral-link').value = referralLink;\n      } catch (error) {\n        console.error('Error signing up:', error);\n        alert('An error occurred. Please try again later.');\n      }\n    });\n  \u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","html",[111],{"type":36,"tag":89,"props":112,"children":113},{"__ignoreMap":86},[114],{"type":47,"value":108},{"type":36,"tag":61,"props":116,"children":118},{"id":117},"react-implementation",[119],{"type":47,"value":120},"React Implementation",{"type":36,"tag":37,"props":122,"children":123},{},[124],{"type":47,"value":125},"Here's an example of a React component that integrates with the Waitlister API.",{"type":36,"tag":80,"props":127,"children":132},{"className":128,"code":130,"language":131,"meta":86},[129],"language-jsx","import React, { useState, useEffect } from 'react';\n\nconst WaitlistForm = () => {\n  const [email, setEmail] = useState('');\n  const [name, setName] = useState('');\n  const [loading, setLoading] = useState(false);\n  const [success, setSuccess] = useState(false);\n  const [error, setError] = useState('');\n  const [position, setPosition] = useState(null);\n  const [referralCode, setReferralCode] = useState('');\n  \n  \u002F\u002F Log view when component mounts\n  useEffect(() => {\n    const logView = async () => {\n      \u002F\u002F Get or generate visitor ID\n      let visitorId = localStorage.getItem('waitlist_visitor_id');\n      if (!visitorId) {\n        visitorId = 'visitor-' + Math.random().toString(36).substring(2, 15);\n        localStorage.setItem('waitlist_visitor_id', visitorId);\n      }\n      \n      try {\n        await fetch('\u002Fapi\u002Flog-view', {\n          method: 'POST',\n          headers: { 'Content-Type': 'application\u002Fjson' },\n          body: JSON.stringify({ visitorId })\n        });\n      } catch (error) {\n        console.error('Error logging view:', error);\n      }\n    };\n    \n    logView();\n  }, []);\n  \n  const handleSubmit = async (e) => {\n    e.preventDefault();\n    \n    if (!email) {\n      setError('Email is required');\n      return;\n    }\n    \n    setLoading(true);\n    setError('');\n    \n    try {\n      const response = await fetch('\u002Fapi\u002Fsign-up', {\n        method: 'POST',\n        headers: { 'Content-Type': 'application\u002Fjson' },\n        body: JSON.stringify({ email, name })\n      });\n      \n      const data = await response.json();\n      \n      if (!response.ok) {\n        setError(data.error?.message || 'Something went wrong');\n        setLoading(false);\n        return;\n      }\n      \n      setPosition(data.position);\n      setReferralCode(data.referral_code);\n      setSuccess(true);\n      setLoading(false);\n    } catch (error) {\n      console.error('Error signing up:', error);\n      setError('An error occurred. Please try again later.');\n      setLoading(false);\n    }\n  };\n  \n  if (success) {\n    const referralLink = `${window.location.origin}?ref=${referralCode}`;\n    \n    return (\n      \u003Cdiv className=\"thank-you-container\">\n        \u003Ch2>Thank You!\u003C\u002Fh2>\n        \u003Cp>You're #{position} in line.\u003C\u002Fp>\n        \u003Cp>Share your unique referral link to move up the waitlist:\u003C\u002Fp>\n        \u003Cinput \n          type=\"text\" \n          value={referralLink} \n          readOnly \n          onClick={(e) => e.target.select()}\n        \u002F>\n      \u003C\u002Fdiv>\n    );\n  }\n  \n  return (\n    \u003Cform onSubmit={handleSubmit}>\n      \u003Ch2>Join Our Waitlist\u003C\u002Fh2>\n      \n      {error && \u003Cdiv className=\"error\">{error}\u003C\u002Fdiv>}\n      \n      \u003Cdiv className=\"form-group\">\n        \u003Clabel htmlFor=\"email\">Email Address\u003C\u002Flabel>\n        \u003Cinput\n          type=\"email\"\n          id=\"email\"\n          value={email}\n          onChange={(e) => setEmail(e.target.value)}\n          required\n        \u002F>\n      \u003C\u002Fdiv>\n      \n      \u003Cdiv className=\"form-group\">\n        \u003Clabel htmlFor=\"name\">Your Name\u003C\u002Flabel>\n        \u003Cinput\n          type=\"text\"\n          id=\"name\"\n          value={name}\n          onChange={(e) => setName(e.target.value)}\n        \u002F>\n      \u003C\u002Fdiv>\n      \n      \u003Cbutton type=\"submit\" disabled={loading}>\n        {loading ? 'Submitting...' : 'Join Waitlist'}\n      \u003C\u002Fbutton>\n    \u003C\u002Fform>\n  );\n};\n\nexport default WaitlistForm;\n","jsx",[133],{"type":36,"tag":89,"props":134,"children":135},{"__ignoreMap":86},[136],{"type":47,"value":130},{"type":36,"tag":61,"props":138,"children":140},{"id":139},"php-example",[141],{"type":47,"value":142},"PHP Example",{"type":36,"tag":37,"props":144,"children":145},{},[146],{"type":47,"value":147},"Here's how to integrate with the Waitlister API using PHP.",{"type":36,"tag":80,"props":149,"children":154},{"className":150,"code":152,"language":153,"meta":86},[151],"language-php","\u003C?php\n\u002F\u002F Configuration\n$waitlistKey = 'your-waitlist-key';\n$apiKey = 'your-api-key';\n\n\u002F\u002F Handle form submission\nif ($_SERVER['REQUEST_METHOD'] === 'POST') {\n    \u002F\u002F Get form data\n    $email = $_POST['email'] ?? '';\n    $name = $_POST['name'] ?? '';\n    \n    \u002F\u002F Validate input\n    if (empty($email)) {\n        http_response_code(400);\n        echo json_encode(['success' => false, 'message' => 'Email is required']);\n        exit;\n    }\n    \n    \u002F\u002F Prepare request data\n    $data = [\n        'email' => $email,\n        'name' => $name,\n        'metadata' => [\n            'referring_domain' => $_SERVER['HTTP_REFERER'] ?? 'direct',\n            'client_ip' => $_SERVER['HTTP_X_FORWARDED_FOR'] \n                ? explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0] \n                : $_SERVER['REMOTE_ADDR']\n        ]\n    ];\n    \n    \u002F\u002F Add subscriber to waitlist\n    $result = addSubscriber($waitlistKey, $apiKey, $data);\n    \n    \u002F\u002F Return result as JSON\n    header('Content-Type: application\u002Fjson');\n    echo json_encode($result);\n    exit;\n}\n\n\u002F**\n * Add a subscriber to the waitlist\n * \n * @param string $waitlistKey The waitlist key\n * @param string $apiKey The API key\n * @param array $data The subscriber data\n * @return array The API response\n *\u002F\nfunction addSubscriber($waitlistKey, $apiKey, $data) {\n    $url = \"https:\u002F\u002Fwaitlister.me\u002Fapi\u002Fv1\u002Fwaitlist\u002F{$waitlistKey}\u002Fsign-up\";\n    \n    $ch = curl_init($url);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_POST, true);\n    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n    curl_setopt($ch, CURLOPT_HTTPHEADER, [\n        'Content-Type: application\u002Fjson',\n        \"X-Api-Key: {$apiKey}\"\n    ]);\n    \n    $response = curl_exec($ch);\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    curl_close($ch);\n    \n    return json_decode($response, true);\n}\n\n\u002F**\n * Log a waitlist view\n * \n * @param string $waitlistKey The waitlist key\n * @param string $apiKey The API key\n * @param string $visitorId Unique visitor ID\n * @return array The API response\n *\u002F\nfunction logView($waitlistKey, $apiKey, $visitorId) {\n    $url = \"https:\u002F\u002Fwaitlister.me\u002Fapi\u002Fv1\u002Fwaitlist\u002F{$waitlistKey}\u002Flog-view\";\n    \n    $data = [\n        'visitor_id' => $visitorId,\n        'metadata' => [\n            'referring_domain' => $_SERVER['HTTP_REFERER'] ?? 'direct'\n        ]\n    ];\n    \n    $ch = curl_init($url);\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n    curl_setopt($ch, CURLOPT_POST, true);\n    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));\n    curl_setopt($ch, CURLOPT_HTTPHEADER, [\n        'Content-Type: application\u002Fjson',\n        \"X-Api-Key: {$apiKey}\"\n    ]);\n    \n    $response = curl_exec($ch);\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    curl_close($ch);\n    \n    return json_decode($response, true);\n}\n?>\n\n\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\">\n\u003Chead>\n    \u003Cmeta charset=\"UTF-8\">\n    \u003Cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    \u003Ctitle>Join Our Waitlist\u003C\u002Ftitle>\n    \u003Cstyle>\n        \u002F* CSS styles here *\u002F\n    \u003C\u002Fstyle>\n\u003C\u002Fhead>\n\u003Cbody>\n    \u003Ch1>Join Our Waitlist\u003C\u002Fh1>\n    \n    \u003Cdiv id=\"sign-up-form\">\n        \u003Cform method=\"post\" id=\"waitlist-form\">\n            \u003Cdiv class=\"form-group\">\n                \u003Clabel for=\"email\">Email Address\u003C\u002Flabel>\n                \u003Cinput type=\"email\" id=\"email\" name=\"email\" required>\n            \u003C\u002Fdiv>\n            \n            \u003Cdiv class=\"form-group\">\n                \u003Clabel for=\"name\">Your Name\u003C\u002Flabel>\n                \u003Cinput type=\"text\" id=\"name\" name=\"name\">\n            \u003C\u002Fdiv>\n            \n            \u003Cbutton type=\"submit\">Join Waitlist\u003C\u002Fbutton>\n        \u003C\u002Fform>\n    \u003C\u002Fdiv>\n    \n    \u003Cdiv id=\"thank-you\" class=\"thank-you\" style=\"display: none;\">\n        \u003Ch2>Thank You!\u003C\u002Fh2>\n        \u003Cp>You're #\u003Cspan id=\"position\">\u003C\u002Fspan> in line.\u003C\u002Fp>\n        \u003Cp>Share your unique referral link to move up the waitlist:\u003C\u002Fp>\n        \u003Cinput type=\"text\" id=\"referral-link\" readonly>\n    \u003C\u002Fdiv>\n    \n    \u003Cscript>\n        \u002F\u002F JavaScript to handle form submission and display thank you message\n        document.getElementById('waitlist-form').addEventListener('submit', function(e) {\n            e.preventDefault();\n            \n            const formData = new FormData(this);\n            \n            fetch(window.location.href, {\n                method: 'POST',\n                body: formData\n            })\n            .then(response => response.json())\n            .then(data => {\n                if (data.success) {\n                    document.getElementById('sign-up-form').style.display = 'none';\n                    document.getElementById('thank-you').style.display = 'block';\n                    document.getElementById('position').textContent = data.position;\n                    \n                    const referralLink = `${window.location.origin}?ref=${data.referral_code}`;\n                    document.getElementById('referral-link').value = referralLink;\n                } else {\n                    alert(data.message || 'An error occurred. Please try again.');\n                }\n            })\n            .catch(error => {\n                console.error('Error:', error);\n                alert('An error occurred. Please try again later.');\n            });\n        });\n        \n        \u002F\u002F Log view on page load\n        document.addEventListener('DOMContentLoaded', function() {\n            \u002F\u002F Get or create visitor ID from\u002Fin localStorage\n            let visitorId = localStorage.getItem('waitlist_visitor_id');\n            if (!visitorId) {\n                visitorId = 'visitor-' + Math.random().toString(36).substring(2, 15);\n                localStorage.setItem('waitlist_visitor_id', visitorId);\n            }\n\n            fetch('log-view.php', {\n                method: 'POST',\n                headers: { 'Content-Type': 'application\u002Fjson' },\n                body: JSON.stringify({ visitorId: visitorId })\n            }).catch(function(error) {\n                console.error('Error logging view:', error);\n            });\n        });\n    \u003C\u002Fscript>\n\u003C\u002Fbody>\n\u003C\u002Fhtml>\n","php",[155],{"type":36,"tag":89,"props":156,"children":157},{"__ignoreMap":86},[158],{"type":47,"value":152},{"type":36,"tag":61,"props":160,"children":162},{"id":161},"best-practices",[163],{"type":47,"value":164},"Best Practices",{"type":36,"tag":37,"props":166,"children":167},{},[168],{"type":47,"value":169},"When implementing the Waitlister API, follow these best practices.",{"type":36,"tag":171,"props":172,"children":173},"ol",{},[174,203,229,255,281],{"type":36,"tag":175,"props":176,"children":177},"li",{},[178,184],{"type":36,"tag":179,"props":180,"children":181},"strong",{},[182],{"type":47,"value":183},"Keep your API key secure",{"type":36,"tag":185,"props":186,"children":187},"ul",{},[188,193,198],{"type":36,"tag":175,"props":189,"children":190},{},[191],{"type":47,"value":192},"Never expose your API key in client-side code",{"type":36,"tag":175,"props":194,"children":195},{},[196],{"type":47,"value":197},"Use server-side code to make API requests",{"type":36,"tag":175,"props":199,"children":200},{},[201],{"type":47,"value":202},"Store your API key as an environment variable",{"type":36,"tag":175,"props":204,"children":205},{},[206,211],{"type":36,"tag":179,"props":207,"children":208},{},[209],{"type":47,"value":210},"Implement proper error handling",{"type":36,"tag":185,"props":212,"children":213},{},[214,219,224],{"type":36,"tag":175,"props":215,"children":216},{},[217],{"type":47,"value":218},"Check for and handle error responses from the API",{"type":36,"tag":175,"props":220,"children":221},{},[222],{"type":47,"value":223},"Provide clear feedback to users when errors occur",{"type":36,"tag":175,"props":225,"children":226},{},[227],{"type":47,"value":228},"Log errors for troubleshooting",{"type":36,"tag":175,"props":230,"children":231},{},[232,237],{"type":36,"tag":179,"props":233,"children":234},{},[235],{"type":47,"value":236},"Generate unique visitor IDs",{"type":36,"tag":185,"props":238,"children":239},{},[240,245,250],{"type":36,"tag":175,"props":241,"children":242},{},[243],{"type":47,"value":244},"Use a consistent method to generate visitor IDs",{"type":36,"tag":175,"props":246,"children":247},{},[248],{"type":47,"value":249},"Store IDs in localStorage or cookies for returning visitors",{"type":36,"tag":175,"props":251,"children":252},{},[253],{"type":47,"value":254},"Send visitor IDs with log-view requests to prevent duplicate counts",{"type":36,"tag":175,"props":256,"children":257},{},[258,263],{"type":36,"tag":179,"props":259,"children":260},{},[261],{"type":47,"value":262},"Track referrals properly",{"type":36,"tag":185,"props":264,"children":265},{},[266,271,276],{"type":36,"tag":175,"props":267,"children":268},{},[269],{"type":47,"value":270},"Extract referral codes from URL parameters",{"type":36,"tag":175,"props":272,"children":273},{},[274],{"type":47,"value":275},"Include referral codes in sign-up requests",{"type":36,"tag":175,"props":277,"children":278},{},[279],{"type":47,"value":280},"Provide users with their referral links after sign-up",{"type":36,"tag":175,"props":282,"children":283},{},[284,289],{"type":36,"tag":179,"props":285,"children":286},{},[287],{"type":47,"value":288},"Consider rate limits",{"type":36,"tag":185,"props":290,"children":291},{},[292,297,302],{"type":36,"tag":175,"props":293,"children":294},{},[295],{"type":47,"value":296},"Implement exponential backoff for retries",{"type":36,"tag":175,"props":298,"children":299},{},[300],{"type":47,"value":301},"Queue requests if you expect high volume",{"type":36,"tag":175,"props":303,"children":304},{},[305],{"type":47,"value":306},"Monitor your API usage to stay within limits",{"type":36,"tag":61,"props":308,"children":310},{"id":309},"next-steps",[311],{"type":47,"value":312},"Next Steps",{"type":36,"tag":37,"props":314,"children":315},{},[316],{"type":47,"value":317},"Now that you've seen examples of how to integrate with the Waitlister API, you might want to:",{"type":36,"tag":185,"props":319,"children":320},{},[321,335,348],{"type":36,"tag":175,"props":322,"children":323},{},[324,326,333],{"type":47,"value":325},"Review the ",{"type":36,"tag":327,"props":328,"children":330},"a",{"href":329},"\u002Fdocs\u002Fapi\u002Fendpoints\u002Fsubscribers\u002Fadd-subscriber",[331],{"type":47,"value":332},"Add Subscriber endpoint",{"type":47,"value":334}," documentation",{"type":36,"tag":175,"props":336,"children":337},{},[338,340,346],{"type":47,"value":339},"Learn about ",{"type":36,"tag":327,"props":341,"children":343},{"href":342},"\u002Fdocs\u002Fapi\u002Frate-limits",[344],{"type":47,"value":345},"API rate limits",{"type":47,"value":347}," and how to handle them",{"type":36,"tag":175,"props":349,"children":350},{},[351,353,359],{"type":47,"value":352},"Implement proper ",{"type":36,"tag":327,"props":354,"children":356},{"href":355},"\u002Fdocs\u002Fapi\u002Fauthentication",[357],{"type":47,"value":358},"authentication",{"type":47,"value":360}," in your application",{"title":86,"searchDepth":362,"depth":362,"links":363},3,[364,369,370,371,372],{"id":63,"depth":365,"text":66,"children":366},2,[367,368],{"id":70,"depth":362,"text":73},{"id":95,"depth":362,"text":98},{"id":117,"depth":365,"text":120},{"id":139,"depth":365,"text":142},{"id":161,"depth":365,"text":164},{"id":309,"depth":365,"text":312}]