JSON API Integration

To consume our API you first need to add a valid website or app into our dashboard, after approval process you will get your API key which you can use to fetch surveys in JSON format.

If you want to fetch surveys directly on users device, here is the endpoint that you want to call:

https://api.monlix.com/api/surveys?appid=[[appid]]&userid=[[userid]]&subid=[[subid]]

If you want to fetch surveys from your own servers, you need to include into endpoint besides above mentioned parameters, users IP address, and user-agent.

https://api.monlix.com/api/surveys/?appid=[[appid]]&userid=[[userid]]&subid=[[subid]]&userip=[[userip]]&ua=[[useragent]]

Response that you should get if you have sent everything properly, and your app/website is approved by our team will look something like this:

[
{
"id": "a7fa1396f5c3424aa13f683c91177dca",
"minPayout": 0.896,
"maxPayout": 1.224,
"minDuration": "10",
"maxDuration": "19",
"rank": 1,
"currency": "USD",
"link": "https://api.monlix.com/api/r?uid=placeyourusername&cid=tdWcdjpJMBcDxanMMWZUyq&rh=f33fd88b76671a8730e12c63c0e733b5&p=1.1199999999999999&sid=undefined&n=TW9ubGl4IFN1cnZleQ==&a=aa7e6c192d65bf39fdaae3ea480fe5dc&url=https%3A%2F%2Fredirect.mnlx.me%2Fapi%2Fv1%2F52d3f63b2709%2Ffc26ba2f7eca43c7a17a57010af4b921%2F%3Fi%3Da7fa1396f5c3424aa13f683c91177dca%26b%3D2placeyourusername%2666482fb%3D5726115",
"name": "Monlix Survey",
"description": "Complete super easy survey!",
"logo": "https://monlix.com/logo.png"
},
{
"id": "618e5021f42b4ab8945eb95c1281fdbe",
"minPayout": 0.44,
"maxPayout": 0.72,
"minDuration": "11",
"maxDuration": "19",
"rank": 0.16648196,
"currency": "USD",
"link": "https://api.monlix.com/api/r?uid=placeyourusername&cid=tdWcdjpJMBcDxanMMWZUyq&rh=6a66092946f9f19f73242398aba9a6bb&p=0.5499999999999999&sid=undefined&n=TW9ubGl4IFN1cnZleQ==&a=aa7e6c192d65bf39fdaae3ea480fe5dc&url=https%3A%2F%2Fredirect.mnlx.me%2Fapi%2Fv1%2F52d3f63b2709%2Ffc26ba2f7eca43c7a17a57010af4b921%2F%3Fi%3D618e5021f42b4ab8945eb95c1281fdbe%26b%3D2placeyourusername%2666482fb%3D5726115",
"name": "Monlix Survey",
"description": "Complete super easy survey!",
"logo": "https://monlix.com/logo.png"
},
...

NOTE: it is advised not to cache survey responses, but to call API for each user, and in fact, for best results, we advise you to refetch API after each click.