Upsert Contact

POSThttps://services.leadconnectorhq.com/contacts/upsert

Please find the list of acceptable values for the country field here

The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Location level. If the setting is configured to check both Email and Phone, the API will attempt to identify an existing contact based on the priority sequence specified in the setting, and will create or update the contact accordingly.

If two separate contacts already exist—one with the same email and another with the same phone—and an upsert request includes both the email and phone, the API will update the contact that matches the first field in the configured sequence, and ignore the second field to prevent duplication.

Request

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123
Headers
Authorization
string
required

Access Token

Example:
Bearer 9c48df2694a849b6089f9d0d3513efe
Version
string
required

API Version

Allowed value:
2021-04-15
Body
firstName
string or null
Example:
Rosan
lastName
string or null
Example:
Deo
name
string or null
Example:
Rosan Deo
email
string or null
Example:
rosan@deos.com
locationId
string
required
Example:
ve9EPM428h8vShlRW1KT
gender
string
Example:
male
phone
string or null
Example:
+1 888-888-8888
address1
string or null
Example:
3535 1st St N
city
string or null
Example:
Dolomite
state
string or null
Example:
AL
postalCode
string
Example:
35061
website
string or null
Example:
https://www.tesla.com
timezone
string or null
Example:
America/Chihuahua
dnd
boolean
Example:
true
dndSettings
object
Call
object
Email
object
SMS
object
WhatsApp
object
GMB
object
FB
object
inboundDndSettings
object
all
object
tags
array[string]

This field will overwrite all current tags associated with the contact. To update a tags, it is recommended to use the Add Tag or Remove Tag API instead.

Example:
["nisi sint commodo amet","consequat"]
customFields
id
string
required
Example:
6dvNaf7VhkQ9snc5vnjJ
key
string
Example:
my_custom_field
field_value
string
Example:
My Text
source
string
Example:
public api
country
string
Example:
US
companyName
string or null
Example:
DGS VolMAX
assignedTo
string

User's Id

Example:
y0BeYjuRIlDwsDcOHOJo

Responses

Successful response

new
boolean
Example:
true
contact
object
id
string
Example:
seD4PfOuKoVMLkEZqohJ
name
string
Example:
rubika deo
locationId
string
Example:
ve9EPM428h8vShlRW1KT
firstName
string
Example:
rubika
lastName
string
Example:
Deo
email
string
Example:
rubika@deos.com
emailLowerCase
string
Example:
rubika@deos.com
timezone
string
Example:
companyName
string
Example:
DGS VolMAX
phone
string
Example:
+18832327657
dnd
boolean
Example:
true
dndSettings
object
type
string
Example:
read
source
string
Example:
public api
assignedTo
string
Example:
ve9EPM428h8vShlRW1KT
address1
string
Example:
3535 1st St N
city
string
Example:
ruDolomitebika
state
string
Example:
AL
country
string
Example:
US
postalCode
string
Example:
35061
website
string
Example:
https://www.tesla.com
tags
array[string]
Example:
["nisi sint commodo amet","consequat"]
dateOfBirth
string
Example:
1990-09-25T00:00:00.000Z
dateAdded
string
Example:
2021-07-02T05:18:26.704Z
dateUpdated
string
Example:
2021-07-02T05:18:26.704Z
attachments
string
ssn
string
keyword
string
Example:
test
firstNameLowerCase
string
Example:
rubika
fullNameLowerCase
string
Example:
rubika deo
lastNameLowerCase
string
Example:
deo
lastActivity
string
Example:
2021-07-16T11:39:30.564Z
customFields
array[object]
businessId
string
Example:
641c094001436dbc2081e642
attributionSource
object
lastAttributionSource
object
visitorId
string

visitorId is the Unique ID assigned to each Live chat visitor.

Example:
ve9EPM428h8vShlRW1KT
traceId
string

Unprocessable Entity

statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity

Unauthorized

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized

Bad Request

statusCode
number
Example:
400
message
string
Example:
Bad Request