External CRM Integration
Syncing a lead to CRM
This page introduces the Lead syncing capabilities of QuickReply.ai with integration to External CRMs having open API/ Webhook infrastructure Whether you're looking to sync Leads to the CRM or send messages from QuickReply.ai via Lead updates within the CRM, by leveraging this integration, you ensure that your data is properly synced in both systems with a bi-directional syncing approach to create seamless workflows.
Pre-requisites
- Active QuickReply.ai account with WhatsApp enabled 
- Active CRM account with Lead Create/ Update/ Fetch API capabilities 
Creating a new Lead - CRM API
POST https://yourdomain.com/crm/create
Headers
Auth-Key*
Authorization Header
This is used to authorize the API requests.
Request Body
phone*
string
Phone Number of the user (With Country Code)
name*
string
Full Name of the user
string
Email of the user
custom_fields
Key-Value Pairs
Extra Attributes which you want to sync to the CRM, where the key-names are the respective schema field names in the CRM
Fields marked with * are Required.
API Response
{
    "lead_id": "7as65dd87a6sd89079asd7d",
    "status": "Successfully Created"
}{
    "status": "Creation Failed",
    "reason": "Error message"
}Sample cURL request
curl --location --request POST 'https://yourdomain.com/crm/create' \
--header 'Auth-Key: Dpg3vnsdjfXwoSGNrT576Sfs7' \
--header 'Content-Type: application/json' \
--data-raw '{
  "phone": "+919634687270",
  "name": "Utkarsh",
  "email": "[email protected]",
  "custom_fields": {
    "key1": "value1",
    "key2": "value2",
    "key3": "value3"
  }
}'Fetching an Existing Lead - CRM API
GET https://yourdomain.com/crm/fetch
Headers
Auth-Key*
Authorization Header
This is used to authorize the API requests.
Request Body
phone*
string
To fetch the Lead data using Phone Number (with country code)
email*
string
To fetch the Lead data using Email
lead_id
string
To fetch the Lead data using Lead ID
Fields marked with * are Required.
API Response
{
  "lead_id": "7as65dd87a6sd89079asd7d",
  "lead_fields": {
    "phone": "+919634687270",
    "name": "Utkarsh",
    "email": "[email protected]",
    "custom_fields": {
      "key1": "value1",
      "key2": "value2",
      "key3": "value3"
    }
  }
}{
    "status": "Not Found",
    "reason": "Error message"
}Sample cURL Request
curl --location --request GET 'https://yourdomain.com/crm/fetch' \
--header 'Auth-Key: Dpg3vnsdjfXwoSGNrT576Sfs7' \
--header 'Content-Type: application/json' \
--data-raw '{
  "phone": "+919634687270",
  "email": "[email protected]",
  "lead_id": "7as65dd87a6sd89079asd7d"
}'Updating an Existing Lead - CRM API
POST/PUT https://yourdomain.com/crm/update/{{lead_id}}
Headers
Auth-Key*
Authorization Header
This is used to authorize the API requests.
Query Parameters
lead_id*
string
Respective Lead ID in the CRM (The same as returned in response from Fetch Lead API)
Request Body
phone*
string
Phone Number of the user (With Country Code)
name*
string
Full Name of the user
string
Email of the user
custom_fields
Key-Value Pairs
Extra Attributes which you want to sync to the CRM, where the key-names are the respective schema field names in the CRM
Fields marked with * are Required.
API Response
{
  "lead_id": "7as65dd87a6sd89079asd7d",
  "status": "Successfully Updated"
}{
    "status": "Update Failed",
    "reason": "Error message"
}Sample cURL Request
curl --location --request POST 'https://yourdomain.com/crm/update/7as65dd87a6sd89079asd7d' \
--header 'Auth-Key: Dpg3vnsdjfXwoSGNrT576Sfs7' \
--header 'Content-Type: application/json' \
--data-raw '{
  "phone": "+919634687270",
  "name": "Utkarsh",
  "email": "[email protected]",
  "custom_fields": {
    "key1": "value1",
    "key2": "value2",
    "key3": "value3"
  }
}'Last updated
Was this helpful?
