GrowthHub API 2.0

Delete Contact

https://services.leadconnectorhq.com/contacts/:contactId

Delete Contact

Requirements

Scope(s)

contacts.write

Auth Method(s)

OAuth Access Token

Private Integration Token

Token Type(s)

Sub-Account Token

Authorization: Authorization

name: Authorization

type: http

scopes: contacts.write

scheme: bearer

bearerFormat: JWT

in: header

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

curl -L 'https://services.leadconnectorhq.com/contacts/:contactId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
const { GrowthHub } = require('@growthhub/api-client');

const growthhub = new GrowthHub({
  clientId: 'your_client_id_here',
  clientSecret: 'your_client_secret_here',
});

try {
  const response = await growthhub.contacts.getContact({
    contactId: 'ocQHyuzHvysMo5N5VsXc'
  });
  console.log(response);
} catch (error) {
  console.error('Error:', error);
}
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://services.leadconnectorhq.com/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

axios.request(config)
.then(res => console.log(res.data))
.catch(err => console.log(err));
var https = require('follow-redirects').https;

var options = {
  method: 'GET',
  hostname: 'services.leadconnectorhq.com',
  path: '/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

var req = https.request(options, function (res) {
  var chunks = [];
  res.on("data", chunk => chunks.push(chunk));
  res.on("end", () => console.log(Buffer.concat(chunks).toString()));
});

req.end();
var request = require('request');

var options = {
  method: 'GET',
  url: 'https://services.leadconnectorhq.com/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
var unirest = require('unirest');

var req = unirest('GET', 'https://services.leadconnectorhq.com/contacts/:contactId')
.headers({
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
})
.end(function (res) {
  if (res.error) throw new Error(res.error);
  console.log(res.raw_body);
});
import http.client

conn = http.client.HTTPSConnection("services.leadconnectorhq.com")

headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
}

conn.request("GET", "/contacts/:contactId", '', headers)
res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "https://services.leadconnectorhq.com/contacts/:contactId"

payload = {}
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://services.leadconnectorhq.com/contacts/:contactId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer <TOKEN>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
$client = new Client();
$headers = [
  'Accept' => 'application/json',
  'Authorization' => 'Bearer <TOKEN>'
];
$request = new Request('GET', 'https://services.leadconnectorhq.com/contacts/:contactId', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
<?php
$request = new HTTP_Request2();
$request->setUrl('https://services.leadconnectorhq.com/contacts/:contactId');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setHeader([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer <TOKEN>'
]);
$response = $request->send();
echo $response->getBody();
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://services.leadconnectorhq.com/contacts/:contactId');
$request->setRequestMethod('GET');
$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization': 'Bearer <TOKEN>'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
  .url("https://services.leadconnectorhq.com/contacts/:contactId")
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer <TOKEN>")
  .build();
Response response = client.newCall(request).execute();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://services.leadconnectorhq.com/contacts/:contactId")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer <TOKEN>")
  .asString();
package main
import (
  "fmt"
  "net/http"
  "io"
)
func main() {
  req, _ := http.NewRequest("GET", "https://services.leadconnectorhq.com/contacts/:contactId", nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  res, _ := http.DefaultClient.Do(req)
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
require "uri"
require "net/http"
url = URI("https://services.leadconnectorhq.com/contacts/:contactId")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Bearer <TOKEN>"
response = https.request(request)
puts response.read_body
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer <TOKEN>")
$response = Invoke-RestMethod 'https://services.leadconnectorhq.com/contacts/:contactId' -Method 'GET' -Headers $headers
$response | ConvertTo-Json

PYTHON

HTTP.CLIENT

import http.client

conn = http.client.HTTPSConnection("services.leadconnectorhq.com")

payload = ''

headers = {

'Accept': 'application/json',

'Authorization': 'Bearer <TOKEN>'

}

conn.request("GET", "/contacts/:contactId", payload, headers)

res = conn.getresponse()

data = res.read()

print(data.decode("utf-8"))

REQUESTS

import requests

url = "https://services.leadconnectorhq.com/contacts/:contactId"

payload = {}

headers = {

'Accept': 'application/json',

'Authorization': 'Bearer <TOKEN>'

}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

PHP

Describe the item or answer the question so that site visitors who are interested get more information. You can emphasize this text with bullets, italics or bold, and add links.

Title or Question

Describe the item or answer the question so that site visitors who are interested get more information. You can emphasize this text with bullets, italics or bold, and add links.

Response

Click the Send API Request button above and see the response here!

REQUEST
▾ Base URL

https://services.leadconnectorhq.com

▾ Auth
▾ Parameters
⚠ This field is required
▾ Body REQUIRED
{
  "firstName": "rosan",
  "lastName": "Deo",
  "name": "rosan Deo",
  "email": "[email protected]",
  "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": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Text"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Text"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Selected Option"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Selected Option"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": 100
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": 100.5
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": [
        "test",
        "test2"
      ]
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": [
        "test",
        "test2"
      ]
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": {
        "f31175d4-2b06-4fc6-b7bc-74cd814c68cb": {
          "meta": {
            "fieldname": "1HeGizb13P0odwgOgKSs",
            "originalname": "IMG_20231215_164412935.jpg",
            "encoding": "7bit",
            "mimetype": "image/jpeg",
            "size": 1786611,
            "uuid": "f31175d4-2b06-4fc6-b7bc-74cd814c68cb"
          },
          "url": "https://services.leadconnectorhq.com/documents/download/w2M9qTZ0ZJz8rGt02jdJ",
          "documentId": "w2M9qTZ0ZJz8rGt02jdJ"
        }
      }
    }
  ],
  "source": "public api",
  "dateOfBirth": "1990-09-25",
  "country": "US",
  "assignedTo": "y0BeYjuRIlDwsDcOHOJo"
}

Delete Contact

https://services.leadconnectorhq.com/contacts/:contactId

Delete Contact

Requirements

Scope(s)

contacts.write

Auth Method(s)

OAuth Access Token

Private Integration Token

Token Type(s)

Sub-Account Token

Authorization: Authorization

name: Authorization

type: http

scopes: contacts.write

scheme: bearer

bearerFormat: JWT

in: header

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

curl -L 'https://services.leadconnectorhq.com/contacts/:contactId' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
const { GrowthHub } = require('@growthhub/api-client');

const growthhub = new GrowthHub({
  clientId: 'your_client_id_here',
  clientSecret: 'your_client_secret_here',
});

try {
  const response = await growthhub.contacts.getContact({
    contactId: 'ocQHyuzHvysMo5N5VsXc'
  });
  console.log(response);
} catch (error) {
  console.error('Error:', error);
}
const axios = require('axios');

let config = {
  method: 'get',
  url: 'https://services.leadconnectorhq.com/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

axios.request(config)
.then(res => console.log(res.data))
.catch(err => console.log(err));
var https = require('follow-redirects').https;

var options = {
  method: 'GET',
  hostname: 'services.leadconnectorhq.com',
  path: '/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

var req = https.request(options, function (res) {
  var chunks = [];
  res.on("data", chunk => chunks.push(chunk));
  res.on("end", () => console.log(Buffer.concat(chunks).toString()));
});

req.end();
var request = require('request');

var options = {
  method: 'GET',
  url: 'https://services.leadconnectorhq.com/contacts/:contactId',
  headers: {
    'Accept': 'application/json',
    'Authorization': 'Bearer <TOKEN>'
  }
};

request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
var unirest = require('unirest');

var req = unirest('GET', 'https://services.leadconnectorhq.com/contacts/:contactId')
.headers({
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
})
.end(function (res) {
  if (res.error) throw new Error(res.error);
  console.log(res.raw_body);
});
import http.client

conn = http.client.HTTPSConnection("services.leadconnectorhq.com")

headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
}

conn.request("GET", "/contacts/:contactId", '', headers)
res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "https://services.leadconnectorhq.com/contacts/:contactId"

payload = {}
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer <TOKEN>'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://services.leadconnectorhq.com/contacts/:contactId',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer <TOKEN>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
<?php
$client = new Client();
$headers = [
  'Accept' => 'application/json',
  'Authorization' => 'Bearer <TOKEN>'
];
$request = new Request('GET', 'https://services.leadconnectorhq.com/contacts/:contactId', $headers);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
<?php
$request = new HTTP_Request2();
$request->setUrl('https://services.leadconnectorhq.com/contacts/:contactId');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setHeader([
  'Accept' => 'application/json',
  'Authorization' => 'Bearer <TOKEN>'
]);
$response = $request->send();
echo $response->getBody();
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://services.leadconnectorhq.com/contacts/:contactId');
$request->setRequestMethod('GET');
$request->setHeaders([
  'Accept' => 'application/json',
  'Authorization': 'Bearer <TOKEN>'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
  .url("https://services.leadconnectorhq.com/contacts/:contactId")
  .addHeader("Accept", "application/json")
  .addHeader("Authorization", "Bearer <TOKEN>")
  .build();
Response response = client.newCall(request).execute();
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://services.leadconnectorhq.com/contacts/:contactId")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer <TOKEN>")
  .asString();
package main
import (
  "fmt"
  "net/http"
  "io"
)
func main() {
  req, _ := http.NewRequest("GET", "https://services.leadconnectorhq.com/contacts/:contactId", nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  res, _ := http.DefaultClient.Do(req)
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
require "uri"
require "net/http"
url = URI("https://services.leadconnectorhq.com/contacts/:contactId")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Authorization"] = "Bearer <TOKEN>"
response = https.request(request)
puts response.read_body
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", "Bearer <TOKEN>")
$response = Invoke-RestMethod 'https://services.leadconnectorhq.com/contacts/:contactId' -Method 'GET' -Headers $headers
$response | ConvertTo-Json

Response

Click the Send API Request button above and see the response here!

REQUEST
▾ Base URL

https://services.leadconnectorhq.com

▾ Auth
▾ Parameters
⚠ This field is required
▾ Body REQUIRED
{
  "firstName": "rosan",
  "lastName": "Deo",
  "name": "rosan Deo",
  "email": "[email protected]",
  "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": [
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Text"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Text"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Selected Option"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": "My Selected Option"
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": 100
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": 100.5
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": [
        "test",
        "test2"
      ]
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": [
        "test",
        "test2"
      ]
    },
    {
      "id": "6dvNaf7VhkQ9snc5vnjJ",
      "key": "my_custom_field",
      "field_value": {
        "f31175d4-2b06-4fc6-b7bc-74cd814c68cb": {
          "meta": {
            "fieldname": "1HeGizb13P0odwgOgKSs",
            "originalname": "IMG_20231215_164412935.jpg",
            "encoding": "7bit",
            "mimetype": "image/jpeg",
            "size": 1786611,
            "uuid": "f31175d4-2b06-4fc6-b7bc-74cd814c68cb"
          },
          "url": "https://services.leadconnectorhq.com/documents/download/w2M9qTZ0ZJz8rGt02jdJ",
          "documentId": "w2M9qTZ0ZJz8rGt02jdJ"
        }
      }
    }
  ],
  "source": "public api",
  "dateOfBirth": "1990-09-25",
  "country": "US",
  "assignedTo": "y0BeYjuRIlDwsDcOHOJo"
}

Request

▾ HEADER PARAMETERS
▾ Version string REQUIRED

Possible values: 2021-07-28

API Version

▾ PATH PARAMETERS
▾ contactId string REQUIRED

Contact Id

Example: ocQHyuzHvysMo5N5VsXc

Delete Contact
Responses
200
400
401
422

Successful response

APPLICATION/JSON
schema example (auto)
▾ succeded boolean
Example: true
{
  "succeded": true
}

Bad Request

APPLICATION/JSON
schema example (auto)
▾ statusCode number
Example: 400
▾ message string
Example: Bad Request
{
  "statusCode": 400,
  "message": "Bad Request"
}

Unauthorized

APPLICATION/JSON
schema example (auto)
▾ statusCode number
Example: 401
▾ message string
Example: Invalid token: access token is invalid
▾ error string
Example: Unauthorized
{
  "statusCode": 401,
  "message": "Invalid token: access token is invalid",
  "error": "Unauthorized"
}

Unprocessable Entity

APPLICATION/JSON
schema example (auto)
▾ statusCode number
Example: 422
▾ message string[]
Example: ["Unprocessable Entity"]
▾ error string
Example: Unprocessable Entity
{
  "statusCode": 422,
  "message": ["Unprocessable Entity"],
  "error": "Unprocessable Entity"
}