Update Contact
curl --request PUT \
--url http://localhost:4000/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe.updated@example.com",
"secondary_email": "jane.secondary@example.com",
"phoneNumber": "+15559876543",
"secondary_phoneNumber": "+15551112222",
"status": "QUALIFIED",
"referrerUrl": "https://example.com/referral"
}
'import requests
url = "http://localhost:4000/v1/contacts"
payload = {
"id": 123,
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe.updated@example.com",
"secondary_email": "jane.secondary@example.com",
"phoneNumber": "+15559876543",
"secondary_phoneNumber": "+15551112222",
"status": "QUALIFIED",
"referrerUrl": "https://example.com/referral"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
firstName: 'Jane',
lastName: 'Doe',
email: 'jane.doe.updated@example.com',
secondary_email: 'jane.secondary@example.com',
phoneNumber: '+15559876543',
secondary_phoneNumber: '+15551112222',
status: 'QUALIFIED',
referrerUrl: 'https://example.com/referral'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 123,
'firstName' => 'Jane',
'lastName' => 'Doe',
'email' => 'jane.doe.updated@example.com',
'secondary_email' => 'jane.secondary@example.com',
'phoneNumber' => '+15559876543',
'secondary_phoneNumber' => '+15551112222',
'status' => 'QUALIFIED',
'referrerUrl' => 'https://example.com/referral'
]),
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 \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:4000/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\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
Update Contact
Update an existing contact by id
PUT
/
v1
/
contacts
Update Contact
curl --request PUT \
--url http://localhost:4000/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": 123,
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe.updated@example.com",
"secondary_email": "jane.secondary@example.com",
"phoneNumber": "+15559876543",
"secondary_phoneNumber": "+15551112222",
"status": "QUALIFIED",
"referrerUrl": "https://example.com/referral"
}
'import requests
url = "http://localhost:4000/v1/contacts"
payload = {
"id": 123,
"firstName": "Jane",
"lastName": "Doe",
"email": "jane.doe.updated@example.com",
"secondary_email": "jane.secondary@example.com",
"phoneNumber": "+15559876543",
"secondary_phoneNumber": "+15551112222",
"status": "QUALIFIED",
"referrerUrl": "https://example.com/referral"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 123,
firstName: 'Jane',
lastName: 'Doe',
email: 'jane.doe.updated@example.com',
secondary_email: 'jane.secondary@example.com',
phoneNumber: '+15559876543',
secondary_phoneNumber: '+15551112222',
status: 'QUALIFIED',
referrerUrl: 'https://example.com/referral'
})
};
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 => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 123,
'firstName' => 'Jane',
'lastName' => 'Doe',
'email' => 'jane.doe.updated@example.com',
'secondary_email' => 'jane.secondary@example.com',
'phoneNumber' => '+15559876543',
'secondary_phoneNumber' => '+15551112222',
'status' => 'QUALIFIED',
'referrerUrl' => 'https://example.com/referral'
]),
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 \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\n}")
req, _ := http.NewRequest("PUT", 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.put("http://localhost:4000/v1/contacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": 123,\n \"firstName\": \"Jane\",\n \"lastName\": \"Doe\",\n \"email\": \"jane.doe.updated@example.com\",\n \"secondary_email\": \"jane.secondary@example.com\",\n \"phoneNumber\": \"+15559876543\",\n \"secondary_phoneNumber\": \"+15551112222\",\n \"status\": \"QUALIFIED\",\n \"referrerUrl\": \"https://example.com/referral\"\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:
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+$Maximum string length:
20Pattern:
^\+?\d+$Available options:
POTENTIAL, QUALIFIED, DISQUALIFIED Maximum string length:
500Response
Successfully updated contact
Show child attributes
Show child attributes
⌘I