ApiLinkedin profiles
Endorse a skill on a LinkedIn profile
Endorse a specific skill on a LinkedIn profile, or randomly select and endorse an unendorsed skill. When random=true, the endpoint fetches all skills on the profile, filters out already-endorsed ones, and randomly endorses one.
POST
/endorse-skillAuthentication requiredProfile
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/endorse-skill' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"profileId":"john-doe-123"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | string | Yes | LinkedIn profile public ID (e.g., "john-doe-123") |
skillId | string | No | Specific skill ID to endorse (from skills list) |
random | boolean | No | If true, randomly select an unendorsed skill to endorse |
Example
{
"profileId": "john-doe-123",
"random": true
}Responses
| Status | Description |
|---|---|
| 200 | Skill endorsed successfully |
| 400 | Bad request - Missing skillId/random, or all skills already endorsed |
| 404 | Profile not found or no skills available |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | Whether the endorsement was successful |
profileId | string | The profile public ID |
memberId | string | The profile member ID |
skillId | string | The ID of the endorsed skill |
skillName | string | Name of the endorsed skill (only when random=true) |
random | boolean | Whether a random skill was selected |
message | string | Success message |
200 Example
{
"success": true,
"profileId": "john-doe-123",
"memberId": "ACoAAABpGQcMBI08myTal7qDJ5zb9lJiM24nFjJI",
"skillId": "5",
"skillName": "JavaScript",
"random": true,
"message": "Successfully endorsed skill: JavaScript"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | string | |
skills | array | List of skills if all are already endorsed |
400 Example
{
"success": false,
"error": "Either skillId or random=true must be provided"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | string |
404 Example
{
"success": false,
"error": "No skills found on this profile"
}