Guides & Tutorials

An example of a signup form

Parameters

Parameter

Value

key

Key string that you can get from your account settings. Recommended.

autoresponder

Id of the automation that is used for newly signed. Optional.

success_url

Redirection location for a successful subscription. Required.

failure_url

Redirection location for an un-successful subscription. Required.

source

Hidden field. Used to define the source of contact sign-up (web, Facebook, etc.). Optional

email

Email address. Must be exact (wildcard does not work). Required.

Custom fields. New fields will be automatically created and attached with subscriber data. Text field.

re-email

Reserved for hidden anti-spam measure that requires no user interaction and blocks most automatic form submissions.

<form class="container" action="https://<domain>.sendsmaily.net/api/opt-in/" method="post" autocomplete="off">
  <div>
    <input type="hidden" name="key" value="XDcsks...3sz" />
    <input type="hidden" name="autoresponder" value="1" />
    <input type="hidden" name="success_url" value="http://www.domeen.ee/ok" />
    <input type="hidden" name="failure_url" value="http://www.domeen.ee/error" />
    <input type="hidden" name="source" value="web" />
  </div>
  <p>
    <label>Email</label>
    <input type="text" name="email" value="" />
  </p>
  <p>
    <label>Name</label>
    <input type="text" name="name" value="" />
  </p>
  <p>
    <label>Yes / no</label>
    <select name="yes_no">
      <option value="yes">Yes</option>
      <option value="no">No</option>
    </select>
  </p>
  <p>
    <button type="submit">Subscribe</button>
  </p>
  <div style="overflow:hidden;height:0px;">
    <input type="text" name="re-email" value="" />
  </div>
</form>

Paste the embedded form code into your website’s HTML where you want the form to appear. The best place to add the code varies from site to site, so reach out to your developer if you’re uncomfortable with modifying your site’s HTML.

For more solutions, see also our API documentation.