Follow or unfollow a LinkedIn profile
Follow or unfollow a LinkedIn member to see their posts in your feed. Following does not require a connection. Provide either profileId (public identifier) or profileUrn (internal URN). Following builds your network visibility without sending connection requests. Rate limit: 100 actions per day.
/followCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/follow' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","profileId":"hasam-ud-din","action":"follow"}'Follow or unfollow a LinkedIn member to see their posts in your feed. Following does not require a connection. Provide either profileId (public identifier) or profileUrn (internal URN). Following builds your network visibility without sending connection requests. Rate limit: 100 actions per day.
Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | string | Conditional | LinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123"). Prefer profileUrn when available. Either profileId or profileUrn must be provided. |
profileUrn | string | Conditional | LinkedIn profile URN (e.g., "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f..."). Preferred over profileId. Either profileUrn or profileId must be provided. |
action | string | No | Action to perform: follow or unfollow the profile |
Example
{
"accountId": "acc_12345",
"profileId": "hasam-ud-din",
"profileUrn": "urn:li:fsd_profile:ACoAABcdefgh",
"action": "follow"
}Responses
| Status | Description |
|---|---|
| 200 | Follow action completed successfully |
| 400 | Bad request - Missing required fields |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | Profile not found |
| 429 | Rate limit exceeded |
Rate Limit Headers
All responses include rate limit information in the headers:
| Header | Description |
|---|---|
X-RateLimit-Action | The action type being rate limited |
X-RateLimit-Limit | Maximum actions allowed per period |
X-RateLimit-Used | Actions used in current period |
X-RateLimit-Remaining | Actions remaining |
X-RateLimit-Reset | ISO 8601 timestamp when limit resets |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
action | string | |
profileUrn | string | LinkedIn profile URN of the followed/unfollowed user |
message | string |
200 Example
{
"success": true,
"action": "follow",
"profileUrn": "urn:li:fsd_profile:ACoAAA24A-MBVEvT49xpVF2gnWrhvmUIPDJshSM",
"message": "Successfully followed user"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "Either profileId or profileUrn must be provided",
"success": false
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "LinkedIn profile not found: invalid-profile-id",
"success": false
}429 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string | |
success | boolean |
429 Example
{
"error": "Rate limit exceeded for FOLLOW: 100/100 used. Resets at 2024-01-16T00:00:00.000Z",
"success": false
}LinkedIn Actions API
Automate LinkedIn follow, messaging, and connection request workflows via API. Check relationships and manage outreach at scale.
Send a LinkedIn message
Send a direct message to a LinkedIn member. Supports regular messages (requires 1st-degree connection) and InMail (for non-connections, requires Premium). Can also send messages in group context. Either recipientProfileId or recipientProfileUrn must be provided. Rate limit: 150 messages per day per LinkedIn account (resets at midnight UTC). Unlike every other send endpoint, EVERY message counts here — replies included. This endpoint predates the cold-outreach quota and still counts unconditionally; POST /conversations/send and the /messaging/send* endpoints exempt replies into an existing conversation. That difference alone is a reason to migrate: a reply-heavy integration burns quota on this endpoint that it would not burn on /conversations/send. Over-quota sends return 429 with `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, and are rejected before any LinkedIn request is made.
