Check relationship status with profile
Check the relationship between your default LinkedIn account and a target profile. Returns connection status (1st, 2nd, 3rd degree), whether you follow them, and if you are connected. Useful for determining which actions are available (message, connect, etc.).
/relationship/{profileId}Code Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/relationship/<profileId>' \ -H 'Authorization: Bearer <your_api_key>'Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
profileId | path | Yes | string | LinkedIn profile public ID (e.g., "john-doe-123") |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Relationship status retrieved successfully |
| 404 | Profile not found |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
connected | boolean | Whether you are 1st-degree connected |
invitationSent | boolean | Whether you have sent a connection invitation |
invitationReceived | boolean | Whether you have received a connection invitation |
status | string | Connection status |
profileUrn | string | LinkedIn profile URN of the target user |
accountId | string | LinkedIn 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
| Name | Type | Description |
|---|---|---|
error | string | |
success | boolean |
404 Example
{
"error": "LinkedIn profile not found: invalid-profile-id",
"success": false
}Withdraw a sent connection invitation
Withdraws a pending connection invitation that was previously sent to a LinkedIn user. Only the profileId is required - other fields will be auto-fetched from the profile if not provided. The API will verify that a pending invitation exists before attempting withdrawal.
Check relationship status with specific account
Check the relationship between a specific LinkedIn account and a target profile. Useful for multi-account setups to check relationships from different accounts. Returns connection degree, follow status, and connection status.
