Skip to main content
POST
/
api
/
v1
/
contacts
Create Contact
curl --request POST \
  --url https://integration.fieldiu.online/api/v1/contacts \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-ORG-ID: <api-key>' \
  --data '
{
  "firstName": "<string>",
  "lastName": "<string>",
  "email": "<string>",
  "mobilePhone": "<string>",
  "businessPhone": "<string>",
  "accountId": "<string>",
  "buildingLocation": "<string>",
  "street1": "<string>",
  "street2": "<string>",
  "city": "<string>",
  "postalCode": "<string>",
  "state": "<string>",
  "country": "<string>"
}
'
import requests

url = "https://integration.fieldiu.online/api/v1/contacts"

payload = {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"mobilePhone": "<string>",
"businessPhone": "<string>",
"accountId": "<string>",
"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>',
email: '<string>',
mobilePhone: '<string>',
businessPhone: '<string>',
accountId: '<string>',
buildingLocation: '<string>',
street1: '<string>',
street2: '<string>',
city: '<string>',
postalCode: '<string>',
state: '<string>',
country: '<string>'
})
};

fetch('https://integration.fieldiu.online/api/v1/contacts', 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/contacts",
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>',
'email' => '<string>',
'mobilePhone' => '<string>',
'businessPhone' => '<string>',
'accountId' => '<string>',
'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/contacts"

payload := strings.NewReader("{\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"accountId\": \"<string>\",\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/contacts")
.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 \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"accountId\": \"<string>\",\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/contacts")

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 \"email\": \"<string>\",\n \"mobilePhone\": \"<string>\",\n \"businessPhone\": \"<string>\",\n \"accountId\": \"<string>\",\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_body

Authorizations

X-API-KEY
string
header
required

Your organization's API key

X-ORG-ID
string
header
required

Your organization's identifier

Body

application/json
firstName
string | null

First name

lastName
string | null

Last name

email
string | null

Email address

mobilePhone
string | null

Mobile phone number

businessPhone
string | null

Business phone number

accountId
string | null

ID of the linked account

buildingLocation
string | null

Building or location name

street1
string | null

Street address line 1

street2
string | null

Street address line 2

city
string | null

City

postalCode
string | null

Postal / ZIP code

state
string | null

State or province

country
string | null

Country

Response

200

Contact created successfully