Skip to main content
Add Followers
POST https://services.leadconnectorhq.com/contacts/{contactId}/followers

Autorización

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

Path parameters

contactId
string
default:"sx6wyHhbFdRXh302Lunr"
required
Contact Id

Body

followers
string[]
required

Respuestas

followers
string[]
followersAdded
string[]
{
  "followers": [
    "sx6wyHhbFdRXh302Lunr",
    "sx6wyHhbFdRXh302LLss"
  ],
  "followersAdded": [
    "Mx6wyHhbFdRXh302Luer",
    "Ka6wyHhbFdRXh302LLsAm"
  ]
}
{}
{}
{}

Ejemplo

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);