Create Contact
curl --request POST \
--url http://localhost:4000/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phoneNumber": "+15551234567",
"status": "POTENTIAL",
"tag": "lead-2024",
"joinedTime": "2024-01-15T10:00:00.000Z",
"eventName": "Product Demo",
"utm": "utm_source=google&utm_medium=cpc",
"country": "US",
"timeZone": "America/New_York",
"ipAddress": "192.168.1.1",
"referrerUrl": "https://example.com/signup"
}
'import requests
url = "http://localhost:4000/v1/contacts"
payload = {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phoneNumber": "+15551234567",
"status": "POTENTIAL",
"tag": "lead-2024",
"joinedTime": "2024-01-15T10:00:00.000Z",
"eventName": "Product Demo",
"utm": "utm_source=google&utm_medium=cpc",
"country": "US",
"timeZone": "America/New_York",
"ipAddress": "192.168.1.1",
"referrerUrl": "https://example.com/signup"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Jane',
lastName: 'Doe',
email: 'jane.doe@example.com',
phoneNumber: '+15551234567',
status: 'POTENTIAL',
tag: 'lead-2024',
joinedTime: '2024-01-15T10:00:00.000Z',
eventName: 'Product Demo',
utm: 'utm_source=google&utm_medium=cpc',
country: 'US',
timeZone: 'America/New_York',
ipAddress: '192.168.1.1',
referrerUrl: 'https://example.com/signup'
})
};
fetch('http://localhost:4000/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_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/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' => 'Jane',
'lastName' => 'Doe',
'email' => 'jane.doe@example.com',
'phoneNumber' => '+15551234567',
'status' => 'POTENTIAL',
'tag' => 'lead-2024',
'joinedTime' => '2024-01-15T10:00:00.000Z',
'eventName' => 'Product Demo',
'utm' => 'utm_source=google&utm_medium=cpc',
'country' => 'US',
'timeZone' => 'America/New_York',
'ipAddress' => '192.168.1.1',
'referrerUrl' => 'https://example.com/signup'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:4000/v1/contacts"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:4000/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contact": {
"id": 123,
"accountId": 123,
"userId": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"status": "<string>",
"phoneNumber": "<string>",
"previewId": "<string>",
"tagId": 123,
"blockedByRecaptcha": true,
"joinedTime": "<string>",
"country": "<string>",
"timeZone": "<string>",
"ipAddress": "<string>",
"blockedId": 123,
"referrerUrl": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"tracking": {}
}
}
}Contacts
Create Contact
Create a new contact. Either email or phoneNumber is required
POST
/
v1
/
contacts
Create Contact
curl --request POST \
--url http://localhost:4000/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phoneNumber": "+15551234567",
"status": "POTENTIAL",
"tag": "lead-2024",
"joinedTime": "2024-01-15T10:00:00.000Z",
"eventName": "Product Demo",
"utm": "utm_source=google&utm_medium=cpc",
"country": "US",
"timeZone": "America/New_York",
"ipAddress": "192.168.1.1",
"referrerUrl": "https://example.com/signup"
}
'import requests
url = "http://localhost:4000/v1/contacts"
payload = {
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe@example.com",
"phoneNumber": "+15551234567",
"status": "POTENTIAL",
"tag": "lead-2024",
"joinedTime": "2024-01-15T10:00:00.000Z",
"eventName": "Product Demo",
"utm": "utm_source=google&utm_medium=cpc",
"country": "US",
"timeZone": "America/New_York",
"ipAddress": "192.168.1.1",
"referrerUrl": "https://example.com/signup"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
firstName: 'Jane',
lastName: 'Doe',
email: 'jane.doe@example.com',
phoneNumber: '+15551234567',
status: 'POTENTIAL',
tag: 'lead-2024',
joinedTime: '2024-01-15T10:00:00.000Z',
eventName: 'Product Demo',
utm: 'utm_source=google&utm_medium=cpc',
country: 'US',
timeZone: 'America/New_York',
ipAddress: '192.168.1.1',
referrerUrl: 'https://example.com/signup'
})
};
fetch('http://localhost:4000/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_PORT => "4000",
CURLOPT_URL => "http://localhost:4000/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' => 'Jane',
'lastName' => 'Doe',
'email' => 'jane.doe@example.com',
'phoneNumber' => '+15551234567',
'status' => 'POTENTIAL',
'tag' => 'lead-2024',
'joinedTime' => '2024-01-15T10:00:00.000Z',
'eventName' => 'Product Demo',
'utm' => 'utm_source=google&utm_medium=cpc',
'country' => 'US',
'timeZone' => 'America/New_York',
'ipAddress' => '192.168.1.1',
'referrerUrl' => 'https://example.com/signup'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "http://localhost:4000/v1/contacts"
payload := strings.NewReader("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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("http://localhost:4000/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4000/v1/contacts")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phoneNumber\": \"+15551234567\",\n \"status\": \"POTENTIAL\",\n \"tag\": \"lead-2024\",\n \"joinedTime\": \"2024-01-15T10:00:00.000Z\",\n \"eventName\": \"Product Demo\",\n \"utm\": \"utm_source=google&utm_medium=cpc\",\n \"country\": \"US\",\n \"timeZone\": \"America/New_York\",\n \"ipAddress\": \"192.168.1.1\",\n \"referrerUrl\": \"https://example.com/signup\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"contact": {
"id": 123,
"accountId": 123,
"userId": 123,
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"status": "<string>",
"phoneNumber": "<string>",
"previewId": "<string>",
"tagId": 123,
"blockedByRecaptcha": true,
"joinedTime": "<string>",
"country": "<string>",
"timeZone": "<string>",
"ipAddress": "<string>",
"blockedId": 123,
"referrerUrl": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>",
"tracking": {}
}
}
}Authorizations
API key required in Authorization header. Format: iclosed-<token>
Body
application/json
Maximum string length:
25Maximum string length:
25Maximum string length:
255Pattern:
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$Maximum string length:
20Pattern:
^\+?\d+$Available options:
POTENTIAL, QUALIFIED, DISQUALIFIED Maximum string length:
100Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Maximum string length:
255Maximum string length:
1000Maximum string length:
2Maximum string length:
50Maximum string length:
45Maximum string length:
500Response
Successfully created contact
Show child attributes
Show child attributes
⌘I