Facebook Pixel
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-skill
Authentication 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

FieldTypeRequiredDescription
accountIdstringNoLinkedIn account ID to use. If not provided, uses the default account.
profileIdstringYesLinkedIn profile public ID (e.g., "john-doe-123")
skillIdstringNoSpecific skill ID to endorse (from skills list)
randombooleanNoIf true, randomly select an unendorsed skill to endorse

Example

{
  "profileId": "john-doe-123",
  "random": true
}

Responses

StatusDescription
200Skill endorsed successfully
400Bad request - Missing skillId/random, or all skills already endorsed
404Profile not found or no skills available

200 Response Parameters

NameTypeDescription
successbooleanWhether the endorsement was successful
profileIdstringThe profile public ID
memberIdstringThe profile member ID
skillIdstringThe ID of the endorsed skill
skillNamestringName of the endorsed skill (only when random=true)
randombooleanWhether a random skill was selected
messagestringSuccess 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

NameTypeDescription
successboolean
errorstring
skillsarrayList of skills if all are already endorsed

400 Example

{
  "success": false,
  "error": "Either skillId or random=true must be provided"
}

404 Response Parameters

NameTypeDescription
successboolean
errorstring

404 Example

{
  "success": false,
  "error": "No skills found on this profile"
}