Facebook Pixel
APILinkedIn Actions

Check relationship status with profile

Check the relationship between your default LinkedIn account and a target profile. Useful for determining which actions are available (message, connect, etc.). `status` is one of four mutually exclusive states: | status | meaning | what you can do | |---|---|---| | `CONNECTED` | 1st-degree connection | message them | | `INVITATION_SENT` | you invited them, still pending | withdraw via `POST /invitations/withdraw` | | `INVITATION_RECEIVED` | they invited you, waiting on you | accept/ignore via `POST /invitations/received/respond` | | `NOT_CONNECTED` | no relationship | invite via `POST /connections/invite` | `INVITATION_RECEIVED` is NOT a connection: the person is still 2nd/3rd degree and cannot be messaged. Check `status`, not just `connected`.

GET/relationship/{profileId}
Authentication requiredRelationships

Code Examples

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

Check the relationship between your default LinkedIn account and a target profile. Useful for determining which actions are available (message, connect, etc.).

status is one of four mutually exclusive states:

statusmeaningwhat you can do
CONNECTED1st-degree connectionmessage them
INVITATION_SENTyou invited them, still pendingwithdraw via POST /invitations/withdraw
INVITATION_RECEIVEDthey invited you, waiting on youaccept/ignore via POST /invitations/received/respond
NOT_CONNECTEDno relationshipinvite via POST /connections/invite

INVITATION_RECEIVED is NOT a connection: the person is still 2nd/3rd degree and cannot be messaged. Check status, not just connected.

Parameters

NameInRequiredTypeDescription
profileIdpathYesstringLinkedIn profile vanity URL slug (the part after linkedin.com/in/, e.g., "john-doe-123")

Request Body

No request body.

Responses

StatusDescription
200Relationship status retrieved successfully
404Profile not found

200 Response Parameters

NameTypeDescription
connectedbooleanWhether you are 1st-degree connected. False while an invitation in either direction is still pending.
invitationSentbooleanYou invited them and they have not responded
invitationReceivedbooleanThey invited YOU and you have not responded. They are not a connection yet and cannot be messaged.
statusstringConnection status — exactly one of the four states; see the endpoint description.
profileUrnstringLinkedIn profile URN of the target user
accountIdstringLinkedIn account ID used for the check

200 Example

{
  "connected": false,
  "invitationSent": false,
  "invitationReceived": false,
  "status": "NOT_CONNECTED",
  "profileUrn": "urn:li:fsd_profile:ACoAAA24A-MBVEvT49xpVF2gnWrhvmUIPDJshSM",
  "accountId": "acc_12345"
}

404 Response Parameters

NameTypeDescription
errorstring
successboolean

404 Example

{
  "error": "LinkedIn profile not found: invalid-profile-id",
  "success": false
}

On this page