Invite members to follow a company

Manage LinkedIn company page invitations and invitation credits.

Use these methods with a LinkedIn account whose owner administers the company page. These are company follow invitations, separate from personal connection requests.

Find the page and check credits

  1. Call List Managed Company Pages and select a page administered by the account owner.
  2. Use its numeric company ID with Get Company Follow Request Credits.
  3. Read remaining_credit, credit_grant, and resets_on before scheduling invitations. Check credits again before sending another batch.
const response = await fetch(
  "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests/credits",
  {
    method: "GET",
    headers: {
      "X-API-KEY": "YOUR_API_KEY",
    },
  },
);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
import requests

response = requests.get(
    "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests/credits",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    timeout=30,
)
response.raise_for_status()
data = response.json()
curl --request GET \
  --url "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests/credits" \
  --header 'X-API-KEY: YOUR_API_KEY'

Send one invitation or a batch

Call Invite Members to Follow a Company with a nonempty member_ids array of distinct LinkedIn member profile IDs (ACo...). Use one ID for a single invitation or several IDs for a batch. Resolve profiles with Get a User Profile; do not pass profile URLs or names as member IDs.

const response = await fetch(
  "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests",
  {
    method: "POST",
    headers: {
      "X-API-KEY": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      member_ids: ["ACo_MEMBER_ID_1", "ACo_MEMBER_ID_2"],
    }),
  },
);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
import requests

response = requests.post(
    "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    json={
        "member_ids": ['ACo_MEMBER_ID_1', 'ACo_MEMBER_ID_2']
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
curl --request POST \
  --url "https://api.unipile.com/v2/acc_123456789/linkedin/company/123456/follow-requests" \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "member_ids": [
    "ACo_MEMBER_ID_1",
    "ACo_MEMBER_ID_2"
  ]
}'

Handle partial success

A successful HTTP response does not mean every invitation succeeded. Inspect result.invitations_count.success, result.invitations_count.failed, and result.invitations_ids. The response does not provide a per-member failure list: do not automatically resend the entire batch when some invitations succeeded.


Did this page help you?