Various ways to post data to IntuList

You are here:
Estimated reading time: 2 min

This article describes how to post leads to IntuList using a variety of tools and programming languages.

Curl/Command Line

curl --location --request POST 'https://intulist.com/api/lists/[LISTID]/addlead' \
--header 'Content-Type: application/json' \
--data-raw '{
  "apikey": "YOURAPIKEY",
  "fname": "Neil",
  "lname": "Ostrich",
  "email": "neilostrich@gmail.com",
  "phone": "6235874587",
  "date_subscribed": "01/14/2021 12:33 pm",
  "address": "4599 E Jackson St.",
  "city": "Phoenix",
  "state": "AZ",
  "zip": "85245",
  "country": "US",
  "ip": "52.14.144.85",
  "gender": "M",
  "offer_url": "newofferurl.com/offer1.html",
  "date_of_birth": "02/05/1985",
  "notes": ""
}'

C# – RestSharp

var client = new RestClient("https://intulist.com/api/lists/[LISTID]/addlead");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\r\n  \"apikey\": \"YOURAPIKEY\",\r\n  \"fname\": \"Neil\",\r\n  \"lname\": \"Ostrich\",\r\n  \"email\": \"neilostrich@gmail.com\",\r\n  \"phone\": \"6235874587\",\r\n  \"date_subscribed\": \"01/14/2021 12:33 pm\",\r\n  \"address\": \"4599 E Jackson St.\",\r\n  \"city\": \"Phoenix\",\r\n  \"state\": \"AZ\",\r\n  \"zip\": \"85245\",\r\n  \"country\": \"US\",\r\n  \"ip\": \"52.14.144.85\",\r\n  \"gender\": \"M\",\r\n  \"offer_url\": \"newofferurl.com/offer1.html\",\r\n  \"date_of_birth\": \"02/05/1985\",\r\n  \"notes\": \"\"\r\n}",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Go – Native

package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://intulist.com/api/lists/[LISTID]/addlead"
  method := "POST"

  payload := strings.NewReader("{
\n  \"apikey\": \"YOURAPIKEY\",
\n  \"fname\": \"Neil\",
\n  \"lname\": \"Ostrich\",
\n  \"email\": \"neilostrich@gmail.com\",
\n  \"phone\": \"6235874587\",
\n  \"date_subscribed\": \"01/14/2021 12:33 pm\",
\n  \"address\": \"4599 E Jackson St.\",
\n  \"city\": \"Phoenix\",
\n  \"state\": \"AZ\",
\n  \"zip\": \"85245\",
\n  \"country\": \"US\",
\n  \"ip\": \"52.14.144.85\",
\n  \"gender\": \"M\",
\n  \"offer_url\": \"newofferurl.com/offer1.html\",
\n  \"date_of_birth\": \"02/05/1985\",
\n  \"notes\": \"\"
\n}")

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
  }
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  defer res.Body.Close()
  body, err := ioutil.ReadAll(res.Body)

  fmt.Println(string(body))
}

HTTP

POST /api/lists/[LISTID]/addlead HTTP/1.1
Host: intulist.com
Content-Type: application/json

{
  "apikey": "YOURAPIKEY",
  "fname": "Neil",
  "lname": "Ostrich",
  "email": "neilostrich@gmail.com",
  "phone": "6235874587",
  "date_subscribed": "01/14/2021 12:33 pm",
  "address": "4599 E Jackson St.",
  "city": "Phoenix",
  "state": "AZ",
  "zip": "85245",
  "country": "US",
  "ip": "52.14.144.85",
  "gender": "M",
  "offer_url": "newofferurl.com/offer1.html",
  "date_of_birth": "02/05/1985",
  "notes": ""
}

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://intulist.com/api/lists/[LISTID]/addlead",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS =>"{\r\n  \"apikey\": \"YOURAPIKEY\",\r\n  \"fname\": \"Neil\",\r\n  \"lname\": \"Ostrich\",\r\n  \"email\": \"neilostrich@gmail.com\",\r\n  \"phone\": \"6235874587\",\r\n  \"date_subscribed\": \"01/14/2021 12:33 pm\",\r\n  \"address\": \"4599 E Jackson St.\",\r\n  \"city\": \"Phoenix\",\r\n  \"state\": \"AZ\",\r\n  \"zip\": \"85245\",\r\n  \"country\": \"US\",\r\n  \"ip\": \"52.14.144.85\",\r\n  \"gender\": \"M\",\r\n  \"offer_url\": \"newofferurl.com/offer1.html\",\r\n  \"date_of_birth\": \"02/05/1985\",\r\n  \"notes\": \"\"\r\n}",
  CURLOPT_HTTPHEADER => array(
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Python

import http.client
import mimetypes
conn = http.client.HTTPSConnection("intulist.com")
payload = "{\r\n  \"apikey\": \"YOURAPIKEY\",\r\n  \"fname\": \"Neil\",\r\n  \"lname\": \"Ostrich\",\r\n  \"email\": \"neilostrich@gmail.com\",\r\n  \"phone\": \"6235874587\",\r\n  \"date_subscribed\": \"01/14/2021 12:33 pm\",\r\n  \"address\": \"4599 E Jackson St.\",\r\n  \"city\": \"Phoenix\",\r\n  \"state\": \"AZ\",\r\n  \"zip\": \"85245\",\r\n  \"country\": \"US\",\r\n  \"ip\": \"52.14.144.85\",\r\n  \"gender\": \"M\",\r\n  \"offer_url\": \"newofferurl.com/offer1.html\",\r\n  \"date_of_birth\": \"02/05/1985\",\r\n  \"notes\": \"\"\r\n}"
headers = {
  'Content-Type': 'application/json'
}
conn.request("POST", "/api/lists/[LISTID]/addlead", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Ruby

require "uri"
require "net/http"

url = URI("https://intulist.com/api/lists/[LISTID]/addlead")

https = Net::HTTP.new(url.host, url.port);
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = "{\r\n  \"apikey\": \"YOURAPIKEY\",\r\n  \"fname\": \"Neil\",\r\n  \"lname\": \"Ostrich\",\r\n  \"email\": \"neilostrich@gmail.com\",\r\n  \"phone\": \"6235874587\",\r\n  \"date_subscribed\": \"01/14/2021 12:33 pm\",\r\n  \"address\": \"4599 E Jackson St.\",\r\n  \"city\": \"Phoenix\",\r\n  \"state\": \"AZ\",\r\n  \"zip\": \"85245\",\r\n  \"country\": \"US\",\r\n  \"ip\": \"52.14.144.85\",\r\n  \"gender\": \"M\",\r\n  \"offer_url\": \"newofferurl.com/offer1.html\",\r\n  \"date_of_birth\": \"02/05/1985\",\r\n  \"notes\": \"\"\r\n}"

response = https.request(request)
puts response.read_body

Node

const axios = require('axios');

const url = "https://intulist.com/api/lists/[LISTID]/addlead";
const headers = {'Content-Type': 'application/json'};
const data = {
  "apikey": "YOURAPIKEY",
  "fname": "Neil",
  "lname": "Ostrich",
  "email": "neilostrich@gmail.com",
  "phone": "6235874587",
  "date_subscribed": "01/14/2021 12:33 pm",
  "address": "4599 E Jackson St.",
  "city": "Phoenix",
  "state": "AZ",
  "zip": "85245",
  "country": "US",
  "ip": "52.14.144.85",
  "gender": "M",
  "offer_url": "newofferurl.com/offer1.html",
  "date_of_birth": "02/05/1985",
  "notes": ""
}

axios({method: 'post', url, data, headers})
    .then(result => {
        console.log(result.data); //Successful response -> {"msg": "success"}
    })
    .catch(err => {
        console.log(`HTTP Status: ${err.response.status} || Error: ${err.response.data}`)
    })
[LISTID] and YOURAPIKEY variables in the above examples should be swapped with your actual list id and API Key.
Was this article helpful?
Dislike 0
Views: 145