ApiLinkedin profiles
Send company follow invitations
Send invitations to LinkedIn users to follow a company page. This allows company page administrators to invite people to follow their company. Requires Super Admin access to the company page. Maximum 50 invitations per request.
POST
/organizations/{companyId}/follow-invitationsAuthentication requiredProfile
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/organizations/<companyId>/follow-invitations' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"profileUrns":["urn:li:fsd_profile:ACoAABJefVoBrz2LR3f...","urn:li:fsd_profile:ACoAABJefVoBrz3XY4g..."]}'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
companyId | path | Yes | string | LinkedIn company ID (numeric ID from organization URN) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
companyId | string | No | LinkedIn company ID (can also be specified in path) |
profileUrns | array | Yes | Array of LinkedIn profile URNs to invite (max 50 per request) |
Example
{
"companyId": "105672170",
"profileUrns": [
"urn:li:fsd_profile:ACoAABJefVoBrz2LR3f...",
"urn:li:fsd_profile:ACoAABJefVoBrz3XY4g..."
]
}Responses
| Status | Description |
|---|---|
| 200 | Invitations processed (check individual results for success/failure) |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - LinkedIn account does not have Super Admin access to the company page |
| 500 | Internal server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | Whether at least one invitation was successful |
accountId | string | LinkedIn account ID used for the request |
companyId | string | The company ID for which invitations were sent |
totalRequested | number | Total number of invitations requested |
totalSuccessful | number | Number of successful invitations |
totalFailed | number | Number of failed invitations |
results | array | Individual results for each invitation |
200 Example
{
"success": true,
"accountId": "696ce9e780e0483585e4e553",
"companyId": "105672170",
"totalRequested": 2,
"totalSuccessful": 2,
"totalFailed": 0,
"results": [
{
"profileUrn": "urn:li:fsd_profile:ACoAABJefVoBrz2LR3f...",
"success": true,
"status": "SENT"
},
{
"profileUrn": "urn:li:fsd_profile:ACoAABJefVoBrz3XY4g...",
"success": true,
"status": "SENT"
}
]
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}403 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
403 Example
{
"error": "Request failed with status code 403"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to send company follow invitations"
}