Get user organizations
Fetch all LinkedIn organizations (company pages) the authenticated user has admin or posting access to. Returns organization details including URN, name, logo, follower count, and visitor count. Use the organization URN for posting content as a company or commenting as a company page.
/organizationsCode Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/organizations' \ -H 'Authorization: Bearer <your_api_key>'Fetch all LinkedIn organizations (company pages) the authenticated user has admin or posting access to. Returns organization details including URN, name, logo, follower count, and visitor count. Use the organization URN for posting content as a company or commenting as a company page.
Parameters
No parameters.
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Organizations retrieved successfully |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Internal server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
accountId | string | LinkedIn account ID used for the request |
organizations | array | |
count | number | Total number of organizations returned |
200 Example
{
"success": true,
"accountId": "696ce9e780e0483585e4e553",
"organizations": [
{
"entityUrn": "urn:li:fsd_company:105672170",
"name": "ConnectSafely.AI",
"universalName": "connectsafelyai",
"logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQExfwnRu-WH9g/company-logo_200_200/...",
"coverImageUrl": "https://media.licdn.com/dms/image/v2/D4D3DAQEZladqoLpujg/image-scale_191_1128/...",
"followerCount": 1823,
"visitorsCount": 500,
"pageType": "COMPANY",
"isFollowing": true
},
{
"entityUrn": "urn:li:fsd_company:102246628",
"name": "DCoderAI",
"universalName": "dcoderai",
"logoUrl": "https://media.licdn.com/dms/image/v2/D560BAQG68RrbqHxeZA/company-logo_200_200/...",
"coverImageUrl": "https://media.licdn.com/dms/image/v2/D563DAQGhK5ci_zeTog/image-scale_191_1128/...",
"followerCount": 213,
"visitorsCount": 21,
"pageType": "COMPANY",
"isFollowing": true
}
],
"count": 2
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "Failed to get organizations"
}Get received invitations
Retrieves received invitations from LinkedIn including connection requests, organization follow invites, and newsletter subscriptions. Returns invitation details with category classification (CONNECTION, ORGANIZATION, NEWSLETTER, EVENT, MEMBER_FOLLOW). Paginate with `nextStartIndex`, never by a page size of your own. LinkedIn picks the page size and has changed it under us; a client that advances by an assumed constant skips whatever the difference is, silently, on a 200. Stop on `endOfList: true`, not on an empty array — an empty page with HTTP 502 / `code: INVITATIONS_UNAVAILABLE` means LinkedIn temporarily returned nothing while the account still has pending invitations, and the request should be retried. `invitationCategory` lists every value the parser can emit. Which ones you actually see depends on what the account has pending — an inbox with no event invites never returns `EVENT`, and that is not a fault. To act on an invitation, pass its `invitationId`, `validationToken` and `linkedInInvitationType` to `POST /invitations/received/respond`.
Get profile visitors
Retrieve a list of people who viewed your LinkedIn profile. Shows visitor name, headline, location, and visit timestamp. Some visitors may be anonymous depending on their privacy settings. Supports pagination and various time ranges.
