Create Lead
curl --request POST \
--url https://integration.fieldiu.online/api/v1/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-ORG-ID: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"companyName": "<string>",
"email": "<string>",
"mobilePhone": "<string>",
"businessPhone": "<string>",
"leadSource": 123,
"accountType": 123,
"rating": 123,
"estimatedValue": 123,
"estimatedCloseDate": "2023-11-07T05:31:56Z",
"buildingLocation": "<string>",
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"country": "<string>"
}
'import requests
url = "https://integration.fieldiu.online/api/v1/leads"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"companyName": "<string>",
"email": "<string>",
"mobilePhone": "<string>",
"businessPhone": "<string>",
"leadSource": 123,
"accountType": 123,
"rating": 123,
"estimatedValue": 123,
"estimatedCloseDate": "2023-11-07T05:31:56Z",
"buildingLocation": "<string>",
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"country": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"X-ORG-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-ORG-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
title: '<string>',
companyName: '<string>',
email: '<string>',
mobilePhone: '<string>',
businessPhone: '<string>',
leadSource: 123,
accountType: 123,
rating: 123,
estimatedValue: 123,
estimatedCloseDate: '2023-11-07T05:31:56Z',
buildingLocation: '<string>',
street1: '<string>',
street2: '<string>',
city: '<string>',
postalCode: '<string>',
state: '<string>',
country: '<string>'
})
};
fetch('https://integration.fieldiu.online/api/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration.fieldiu.online/api/v1/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'title' => '<string>',
'companyName' => '<string>',
'email' => '<string>',
'mobilePhone' => '<string>',
'businessPhone' => '<string>',
'leadSource' => 123,
'accountType' => 123,
'rating' => 123,
'estimatedValue' => 123,
'estimatedCloseDate' => '2023-11-07T05:31:56Z',
'buildingLocation' => '<string>',
'street1' => '<string>',
'street2' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'state' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-ORG-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration.fieldiu.online/api/v1/leads"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-ORG-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration.fieldiu.online/api/v1/leads")
.header("X-API-KEY", "<api-key>")
.header("X-ORG-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.fieldiu.online/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-ORG-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyLeads
Create Lead
Creates a new lead record in the FieldIU sales pipeline.
POST
/
api
/
v1
/
leads
Create Lead
curl --request POST \
--url https://integration.fieldiu.online/api/v1/leads \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-ORG-ID: <api-key>' \
--data '
{
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"companyName": "<string>",
"email": "<string>",
"mobilePhone": "<string>",
"businessPhone": "<string>",
"leadSource": 123,
"accountType": 123,
"rating": 123,
"estimatedValue": 123,
"estimatedCloseDate": "2023-11-07T05:31:56Z",
"buildingLocation": "<string>",
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"country": "<string>"
}
'import requests
url = "https://integration.fieldiu.online/api/v1/leads"
payload = {
"firstName": "<string>",
"lastName": "<string>",
"title": "<string>",
"companyName": "<string>",
"email": "<string>",
"mobilePhone": "<string>",
"businessPhone": "<string>",
"leadSource": 123,
"accountType": 123,
"rating": 123,
"estimatedValue": 123,
"estimatedCloseDate": "2023-11-07T05:31:56Z",
"buildingLocation": "<string>",
"street1": "<string>",
"street2": "<string>",
"city": "<string>",
"postalCode": "<string>",
"state": "<string>",
"country": "<string>"
}
headers = {
"X-API-KEY": "<api-key>",
"X-ORG-ID": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-API-KEY': '<api-key>',
'X-ORG-ID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
firstName: '<string>',
lastName: '<string>',
title: '<string>',
companyName: '<string>',
email: '<string>',
mobilePhone: '<string>',
businessPhone: '<string>',
leadSource: 123,
accountType: 123,
rating: 123,
estimatedValue: 123,
estimatedCloseDate: '2023-11-07T05:31:56Z',
buildingLocation: '<string>',
street1: '<string>',
street2: '<string>',
city: '<string>',
postalCode: '<string>',
state: '<string>',
country: '<string>'
})
};
fetch('https://integration.fieldiu.online/api/v1/leads', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integration.fieldiu.online/api/v1/leads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'firstName' => '<string>',
'lastName' => '<string>',
'title' => '<string>',
'companyName' => '<string>',
'email' => '<string>',
'mobilePhone' => '<string>',
'businessPhone' => '<string>',
'leadSource' => 123,
'accountType' => 123,
'rating' => 123,
'estimatedValue' => 123,
'estimatedCloseDate' => '2023-11-07T05:31:56Z',
'buildingLocation' => '<string>',
'street1' => '<string>',
'street2' => '<string>',
'city' => '<string>',
'postalCode' => '<string>',
'state' => '<string>',
'country' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-ORG-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integration.fieldiu.online/api/v1/leads"
payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-ORG-ID", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integration.fieldiu.online/api/v1/leads")
.header("X-API-KEY", "<api-key>")
.header("X-ORG-ID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://integration.fieldiu.online/api/v1/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["X-ORG-ID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"title\": \"<string>\",\n \"companyName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"leadSource\": 123,\n \"accountType\": 123,\n \"rating\": 123,\n \"estimatedValue\": 123,\n \"estimatedCloseDate\": \"2023-11-07T05:31:56Z\",\n \"buildingLocation\": \"<string>\",\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"city\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Your organization's API key
Your organization's identifier
Body
application/json
First name
Last name
Job title
Company name
Email address
Mobile phone number
Business phone number
Lead source code
Account type code
Lead quality rating code
Estimated deal value
Estimated close date (ISO 8601)
Building or location name
Street address line 1
Street address line 2
City
Postal / ZIP code
State or province
Country
Response
200
Lead created successfully
⌘I

