Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt

Use this file to discover all available pages before exploring further.

Please find the list of acceptable values for the country field here<br/><br/>The Upsert API will adhere to the configuration defined under the “Allow Duplicate Contact” setting at the Account 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.<br/><br/>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.
POST https://services.leadconnectorhq.com/contacts/upsert

Autorizacion

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticacion.
Version
string
default:"2021-07-28"
required
Version de la API.

Body

firstName
string
default:"Rosan"
lastName
string
default:"Deo"
name
string
default:"Rosan Deo"
email
string
default:"rosan@deos.com"
locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
gender
string
default:"male"
phone
string
default:"+1 888-888-8888"
address1
string
default:"3535 1st St N"
city
string
default:"Dolomite"
state
string
default:"AL"
postalCode
string
default:"35061"
website
string
default:"https://www.tesla.com"
timezone
string
default:"America/Chihuahua"
dnd
boolean
default:"True"
dndSettings
object
inboundDndSettings
object
tags
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.
customFields
object[]
source
string
default:"public api"
dateOfBirth
object
default:"1990-09-25"
The birth date of the contact. Supported formats: YYYY/MM/DD, MM/DD/YYYY, YYYY-MM-DD, MM-DD-YYYY, YYYY.MM.DD, MM.DD.YYYY, YYYY_MM_DD, MM_DD_YYYY
country
string
default:"US"
companyName
string
default:"DGS VolMAX"
assignedTo
string
default:"y0BeYjuRIlDwsDcOHOJo"
User’s Id
createNewIfDuplicateAllowed
boolean
default:"False"
Controls whether to create a new contact or update an existing duplicate. Scenario 1: If this value is true and the account allows duplicate contacts, a new contact will be created immediately without checking for duplicates. Scenario 2: If this value is true but the account does not allow duplicate contacts, this field is ignored and the normal upsert behavior applies: the API will search for an existing duplicate contact, update it if found, or create a new contact if not found. Scenario 3: If this value is false or not provided, the normal upsert behavior applies regardless of the account’s duplicate contact setting.

Respuestas

new
boolean
default:"True"
contact
object
traceId
string
{
  "new": true,
  "contact": {
    "id": "seD4PfOuKoVMLkEZqohJ",
    "name": "rubika deo",
    "locationId": "ve9EPM428h8vShlRW1KT",
    "firstName": "rubika",
    "lastName": "Deo",
    "email": "rubika@deos.com",
    "emailLowerCase": "rubika@deos.com",
    "timezone": "Asia/Calcutta",
    "companyName": "DGS VolMAX",
    "phone": "+18832327657",
    "dnd": true,
    "dndSettings": {
      "Call": {
        "status": "active",
        "message": "string",
        "code": "string"
      },
      "Email": {
        "status": "active",
        "message": "string",
        "code": "string"
      },
      "SMS": {
        "status": "active",
        "message": "string",
        "code": "string"
      },
      "WhatsApp": {
        "status": "active",
        "message": "string",
        "code": "string"
      },
      "GMB": {
        "status": "active",
        "message": "string",
        "code": "string"
  // truncado: 81 lineas mas
}
{}
{}
{}

Ejemplo

curl -X POST 'https://services.leadconnectorhq.com/contacts/upsert' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "firstName": "Rosan",
  "lastName": "Deo",
  "name": "Rosan Deo",
  "email": "rosan@deos.com",
  "locationId": "ve9EPM428h8vShlRW1KT",
  "gender": "male",
  "phone": "+1 888-888-8888",
  "address1": "3535 1st St N",
  "city": "Dolomite",
  "state": "AL",
  "postalCode": "35061",
  "website": "https://www.tesla.com",
  "timezone": "America/Chihuahua",
  "dnd": true,
  "dndSettings": {
    "Call": {
      "status": "active",
      "message": "string",
      "code": "string"
    },
    "Email": {
      "status": "active",
      "message": "string",
      "code": "string"
    },
    "SMS": {
      "status": "active",
      "message": "string",
      "code": "string"
    },
    "WhatsApp": {
      "status": "active",
      "message": "string",
      "code": "string"
    },
    "GMB": {
      "status": "active",
      "message": "string",
      "code": "string"
    },
    "FB": {
      "status": "active",
      "message": "string",
      "code": "string"
    }
  },
  "inboundDndSettings": {
    "all": {
      "status": "active",
      "message": "string"
    }
  },
  "tags": [
    "nisi sint commodo amet",
    "consequat"
  ],
  "customFields": [],
  "source": "public api",
  "dateOfBirth": "1990-09-25",
  "country": "US",
  "companyName": "DGS VolMAX",
  "assignedTo": "y0BeYjuRIlDwsDcOHOJo",
  "createNewIfDuplicateAllowed": false
}'