> ## Documentation Index
> Fetch the complete documentation index at: https://codemail.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Signup

> Signup a user to your mailing list

<CodeGroup>
  ```html cm.html theme={null}
    
  <script type="module">
      import { initializeApp } from "https://www.gstatic.com/firebasejs/9.14.0/firebase-app.js";
      import { getStorage, ref, uploadString } from "https://email-1.zymono.repl.co/1.0/storageapi.js"; 
  </script>

  <form id="cmForm">
    <input placeholder="Please Enter Your Email" id="codemail-email" type="email" required><br>
    <input type="submit" value="Subscribe"><br><br>
    This email signup form was created with Zymono Codemail and the Zymono <a href="//zymono.com/policy/privacy.html">Privacy Policy</a> and <a href="//zymono.com/policy/terms.html">Terms of Service</a> apply.
  </form>

  <script type="module">
    import { subscribe, saveCloud } from  "https://codemail.zymono.com/1.0/mail.js"
    window.addEventListener("load", function() {
      document.getElementById('cmForm').addEventListener("submit", function(event) {
        event.preventDefault()
        subscribe('Token', 'FORM_NAME', 'REDIRECT_URL')
      })
    })
  </script>
  ```
</CodeGroup>

<br />

<ParamField path="Token" type="token">
  The token given to you by Codemail
</ParamField>

<ParamField path="FORM_NAME" type="string">
  Name that will be displayed for signups
</ParamField>

<ParamField path="REDIRECT_URL" type="URL">
  URL for the user to be redirected to upon completion. (Enter `#` for no redirect)
</ParamField>

<Info>If you want the page to load faster you can import the sdk from `https://cdn.jsdelivr.net/npm/codemail@1.0.4/mail.js`. Please note, this will not always be up to date with the official sdk.</Info>

Navigate back to [https://codemail.zymono.com/dashboard/](https://codemail.zymono.com/dashboard/) to see and export your mailing list.
