Connections

Connections

Voyager provides full connection lifecycle management — send requests with personalized notes, accept inbound invitations, check pending requests, and remove connections.

Send a Connection Request

$curl -X POST "$BASE/api/connect" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{
> "profileUrl": "https://www.linkedin.com/in/janesmith/",
> "message": "Hi Jane, I noticed your work on distributed systems at Acme. Would love to connect."
> }'
1{
2 "success": true
3}

Connection request notes are limited to 300 characters by LinkedIn. The message parameter is optional — requests without a note have a higher acceptance rate according to most studies, but personalized notes work better for cold outreach.

Check Pending Inbound Requests

See who wants to connect with you:

$curl -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> "$BASE/api/connect/received"
1{
2 "success": true,
3 "invitations": [
4 {
5 "invitationUrn": "urn:li:fsd_invitation:123456",
6 "sharedSecret": "abc123",
7 "from": {
8 "fullName": "John Doe",
9 "headline": "CEO at StartupCo",
10 "vanityName": "johndoe",
11 "profileUrl": "https://www.linkedin.com/in/johndoe/"
12 },
13 "sentTime": "2026-03-16T10:30:00.000Z",
14 "message": "Hey, saw your talk at the conference. Would love to chat."
15 }
16 ]
17}

Accept a Connection Request

Use the invitationUrn and sharedSecret from the received invitations list:

$curl -X POST "$BASE/api/connect/accept" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{
> "invitationUrn": "urn:li:fsd_invitation:123456",
> "sharedSecret": "abc123"
> }'
1{
2 "success": true
3}

Remove a Connection

$curl -X DELETE "$BASE/api/connection" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{"profileUrl": "https://www.linkedin.com/in/janesmith/"}'

Check Relationship Before Connecting

Before sending a connection request, check whether you are already connected or have a pending invitation:

$curl -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> "$BASE/api/relationship/status?profileUrl=https://www.linkedin.com/in/janesmith/"
1{
2 "success": true,
3 "data": {
4 "connected": false,
5 "connectionDegree": "2ND",
6 "canMessageDirectly": false,
7 "canConnect": true,
8 "openProfile": false,
9 "pendingInvitationSent": false
10 }
11}

Key fields to check:

  • connected: true — Already connected, no need to send request
  • pendingInvitationSent: true — You already sent a request, wait for response
  • canConnect: false — LinkedIn is blocking connection (rate limit or restriction)

Follow / Unfollow

Follow a profile without connecting (you will see their posts in your feed):

$# Follow
$curl -X POST "$BASE/api/follow" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{"profileUrl": "https://www.linkedin.com/in/janesmith/"}'
$
$# Unfollow
$curl -X POST "$BASE/api/follow" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{"profileUrl": "https://www.linkedin.com/in/janesmith/", "unfollow": true}'

Visit a Profile

Trigger a “profile viewed” notification (useful for warming up prospects):

$curl -X POST "$BASE/api/visit" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{"profileUrl": "https://www.linkedin.com/in/janesmith/"}'

Profile visits are async jobs. The endpoint returns a jobId — poll GET /api/jobs/:jobId for completion.

Event-Driven Connection Management

Set up webhooks to be notified of new connection requests:

$curl -X POST "$BASE/api/webhooks" \
> -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> -H "Content-Type: application/json" \
> -d '{
> "url": "https://your-server.com/webhook",
> "events": ["connection_received"],
> "secret": "your-hmac-secret"
> }'

Or poll the event feed:

$curl -H "Authorization: Bearer $KEY" \
> -H "X-User-Id: $USER" \
> "$BASE/api/events?types=connection.received&since=2026-03-17T00:00:00Z"
  • Connection requests: 60 seconds between requests, max ~20 per day for new accounts
  • Acceptance: No specific limit, but batch-accepting dozens at once may look automated
  • Profile visits: 5-10 seconds between visits

LinkedIn limits the number of weekly connection requests. Exceeding the limit triggers a temporary restriction. Voyager reports usage via GET /api/session/capabilities — your agent should check connectionsRequested and pace accordingly.