Register API

A single POST-endpoint to handle your waiting list.

Set the apiKey in the query params.

In the JSON payload, email is the user's email and url is the current URL of your website. This is important to fetch referral codes.

var user_email = '[email protected]'
var API_KEY = 'key123'
var current_url = 'yourwebsite.com/referralCode=1234'

post(`/register?apiKey=${API_KEY}`, {
    email: user_email,
    url: current_url
}, success, failure)

In case you want to capture more information from the user at the time registration you can do so. Common use case if to capture user's name. You can do so by sending this in the metadata field.

var user_email = '[email protected]'
var API_KEY = 'key123'
var current_url = 'yourwebsite.com/referralCode=1234'

post(`/register?apiKey=${API_KEY}`, {
    email: user_email,
    url: current_url,
    metadata: {
      name: "full name"
    }
}, success, failure)

The response payload contains email and metadata the same as the one in the request. referralCode is the unique referral code for the given email address and userType can have only two values SIGN_UP or REFERRAL.

The emailDetails block contains validation information based on the account name and domain.

  • free is a boolean field refers to whether the email address used for signing up is from domains like Gmail, Yahoo etc.
  • disposable is a boolean field refers to whether the email address used for signing up is from sites like Mailinator, Temp Mail etc.
  • role is boolean field refers to role-based email addresses (like admin@, help@, sales@, leads@) which are email addresses that are not associated with a particular person, but rather with a company, department, position or group of recipients.
  • md5 is a string which can be helpful for fetching gravatar profiles for a user. Checkout the gravatar API
{
    "code": "200",
    "data": {
        "email": "[email protected]",
        "referralCode": "V9alRn",
        "metadata": {
            "customField1": "value1",
            "customField2": "value2",
            "customField3": "value3"
        },
        "emailDetails": {
            "address": "[email protected]",
            "free": false,
            "status": "VALID",
            "account": "name",
            "domain": "example.com",
            "timestamp": 1605126210,
            "md5": "a130ced3f36ffd4604f4dae04b2b3bcd",
            "disposable": false,
            "role": false
        },
        "createdAt": "2020-11-11T20:23:30.23117Z",
        "userType": "SIGN_UP"
    }
}

📘

Email and URL are both mandatory in the payload. Metadata is optional. If the user were to try to register again with the same email we would return the same data.

Language
Click Try It! to start a request and see the response here!