Facebook Pixel
APILinkedIn User

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/invitations/received
Authentication requiredUser

Code Examples

curl -X GET 'https://api.connectsafely.ai/linkedin/invitations/received' \
-H 'Authorization: Bearer <your_api_key>'

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.

Parameters

NameInRequiredTypeDescription
accountIdqueryNostringLinkedIn account ID to use. If not provided, uses the default account.
startIndexqueryNonumberPagination start index (0-indexed), counted in invitations. Advance using nextStartIndex from the previous response, not by a fixed step — LinkedIn chooses the page size (10 today) and it is not guaranteed.

Request Body

No request body.

Responses

StatusDescription
200Received invitations retrieved successfully
401Unauthorized - invalid or missing authentication
500Server error while fetching received invitations
502Received invitations temporarily unavailable — the list came back empty but the account still has pending invitations. Retryable; do NOT treat as the end of the list. Two cases, told apart by which field is present: candidateCount means LinkedIn returned invitation cards we could not read, pendingCount means it returned no cards at all while the account has pending connection requests.

200 Response Parameters

NameTypeDescription
successboolean
invitationsarray
countnumberNumber of invitations returned
endOfListbooleantrue only when this page is empty AND the page genuinely contained no invitation cards AND the account has no pending connection requests beyond startIndex. Paginate until this is true — never stop on an empty array alone.
startIndexnumberCurrent pagination start index
nextStartIndexnumberstartIndex for the next page: where this page ended (startIndex + count). Use this and nothing else to advance — LinkedIn chooses the page size, so advancing by an assumed constant skips records.
accountIdstringLinkedIn account ID used

200 Example

{
  "success": true,
  "endOfList": false,
  "invitations": [
    {
      "id": "7455891636745551899",
      "invitationId": "7455891636745551899",
      "invitationUrn": "urn:li:invitation:7455891636745551899",
      "memberId": "",
      "memberUrn": "",
      "invitationType": "RECEIVED",
      "invitationCategory": "ORGANIZATION",
      "linkedInInvitationType": "GenericInvitationType_ORGANIZATION",
      "validationToken": "C712w50Z",
      "receivedAt": "2 weeks ago",
      "companyName": "ZenX8Studio",
      "profile": {
        "firstName": "Yash",
        "lastName": "Jadhav",
        "profileUrl": "https://www.linkedin.com/in/yash-jadhav-a03656326/",
        "publicIdentifier": "yash-jadhav-a03656326"
      }
    },
    {
      "id": "7455163451166860117",
      "invitationId": "7455163451166860117",
      "invitationUrn": "urn:li:invitation:7455163451166860117",
      "memberId": "",
      "memberUrn": "",
      "invitationType": "RECEIVED",
      "invitationCategory": "NEWSLETTER",
      "linkedInInvitationType": "GenericInvitationType_ORGANIZATION",
      "validationToken": "EJx1vfKg",
      "receivedAt": "2 weeks ago",
      "newsletterName": "VAYUZ Insights",
      "profile": {
        "firstName": "Natalya",
        "lastName": "Singh",
        "profileUrl": "",
        "publicIdentifier": ""
      }
    },
    {
      "id": "7455301624689844224",
      "invitationId": "7455301624689844224",
      "invitationUrn": "urn:li:invitation:7455301624689844224",
      "memberId": "ACoAAAYHg8oBNy-PmYu4ZIXcv5yOcNldwpl8lj8",
      "memberUrn": "urn:li:fsd_profile:ACoAAAYHg8oBNy-PmYu4ZIXcv5yOcNldwpl8lj8",
      "invitationType": "RECEIVED",
      "invitationCategory": "CONNECTION",
      "linkedInInvitationType": "GenericInvitationType_CONNECTION",
      "validationToken": "jywembME",
      "receivedAt": "2 weeks ago",
      "profile": {
        "firstName": "Deepika",
        "lastName": "Khare",
        "profileUrl": "https://www.linkedin.com/in/deepika-khare/",
        "publicIdentifier": "deepika-khare"
      }
    }
  ],
  "count": 10,
  "startIndex": 0,
  "accountId": "69da1eacf365891afa0426a4"
}

401 Response Parameters

NameTypeDescription
errorstring

401 Example

{
  "error": "example_value"
}

500 Response Parameters

NameTypeDescription
errorstring

500 Example

{
  "error": "example_value"
}

502 Example

{
  "success": false,
  "code": "INVITATIONS_UNAVAILABLE",
  "error": "Received invitations unavailable: LinkedIn returned 10 invitation cards at startIndex 0 but none could be parsed — their card structure has changed. Retry later — do NOT treat this as the end of the list.",
  "startIndex": 0,
  "candidateCount": 10,
  "accountId": "69da1eacf365891afa0426a4"
}

On this page