Add Followers
http
POST https://services.leadconnectorhq.com/contacts/{contactId}/followersAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Path parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
contactId | string | Yes | sx6wyHhbFdRXh302Lunr | Contact Id |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
followers | string[] | Yes |
Responses
201 - Successful response
followers(string[])followersAdded(string[])
json
{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302LLss"
],
"followersAdded": [
"Mx6wyHhbFdRXh302Luer",
"Ka6wyHhbFdRXh302LLsAm"
]
}400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/contacts/YOUR_contactId/followers' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"followers": [
"sx6wyHhbFdRXh302Lunr",
"sx6wyHhbFdRXh302Lunr"
]
}'const response = await fetch('https://services.leadconnectorhq.com/contacts/YOUR_contactId/followers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/contacts/YOUR_contactId/followers',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"followers": ["sx6wyHhbFdRXh302Lunr", "sx6wyHhbFdRXh302Lunr"]},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/contacts/YOUR_contactId/followers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'followers': ['sx6wyHhbFdRXh302Lunr', 'sx6wyHhbFdRXh302Lunr']}),
]);
$data = json_decode(curl_exec($ch), true);