Leads

Creating Leads using API

It's useful if you want to capture leads from your website or from other apps. It works like public contact registration and no api key is required.

Request

End point-

api/create-lead

Paramis required ?
last_nameYesLast name
first_nameNoFirst name
titleNoTitle
companyNoCompany
websiteNoWebsite
emailNoEmail
phoneNoPhone
streetNoStreet / Address line 1
cityNoCity
stateNoState
zipNoZIP / Postal code
countryNoCountry

Example using Javascript ( React + axios )

const requestConfig = {
    headers: {
        "Content-Type": "application/x-www-form-urlencoded"
    }
};
const clx_url = "https://demo.cloudonex.com"
let formData = new FormData();
formData.append("first_name", values.first_name);
formData.append("last_name", values.last_name);
formData.append("email", values.last_name);
formData.append("company", values.last_name);
axios
    .post(
        clx_url + "/?ng=api/create-lead",
        formData,
        requestConfig
    )
    .then(response => {
        if (response.data.success) {} else {
            this.setState({
                errors: response.data.errors
            });
        }

        actions.setSubmitting(false);
    })
    .catch(function(response) {
        actions.setSubmitting(false);
        console.log(response);
    });