title: Add subscriber to my mailchimp subscriber list
body: <p>I am new to backend web development and trying to create subscriber through a sign up page and add them to my Mailchimp through API but I am not been able to create subscriber (subscribers are not adding in my Mailchimp audience list). Below is my code.</p>
  <pre><code> const port = 3000;
      
      const https = require('node:https');
      
      const express = require('express');
      const app = express();
      
      app.use(express.static(&quot;public&quot;));
      
      const bodyParser = require('body-parser');
      app.use(bodyParser.urlencoded({
        extended: true
      }));
      
      app.get('/', (req, res) =&gt; {
        res.sendFile(__dirname + &quot;/signup.html&quot;)
      });
      
      app.post('/', (req, res) =&gt; {
        const email = req.body.emailId;
        const firstName = req.body.firstName;
        const lastName = req.body.lastName;
      
        var data = {
          members: [{
            email_address: email,
            status: &quot;Subscribed&quot;,
            merge_fields: {
              FNAME: firstName,
              LNAME: lastName
            }
          }]
        };
      
        const jsonData = JSON.stringify(data);
      
        const url = &quot;https://us11.api.mailchimp.com/3.0/lists/&quot;list_id&quot;/&quot;;
        const options = {
          method: &quot;POST&quot;,
          auth: &quot;dALamyan:apiKey&quot;
        };
      
        const request = https.request(url, options, (response) =&gt; {
          response.on(&quot;data&quot;, (data) =&gt; {
            console.log(JSON.parse(data));
          });
        });
        request.write(jsonData);
        request.end;
      });
      
      
      app.listen(port, () =&gt; {
        console.log(&quot;app listening on port 3000.&quot;);
      });
  </code></pre>