# endorsePersonSkill

This method allows you to endorse a skill on the profile of a person who is your 1st-degree connection.

> LinkedIn lets you endorse skills only of your **1st-degree connections**. For anyone else, the method endorses nothing and returns `connectionNotFound`.

> The method never removes an endorsement. If you have already endorsed the skill, it is left as it is and the method succeeds.

> To endorse every skill whose name matches one or more patterns, use [`endorsePersonSkills`](/sdks/endorse-person-skills).

```typescript
try {
  const workflow = await linkedapi.endorsePersonSkill.execute({
    personUrl: "https://www.linkedin.com/in/person1",
    skillName: "Project Management"
  });

  const { errors } = await linkedapi.endorsePersonSkill.result(workflow.workflowId);

  // The list of possible execution errors is below
  if (errors && errors.length > 0) {
    console.warn('Workflow completed with execution errors:');
    errors.forEach(error => {
      console.warn(` - Type: ${error.type}, Message: ${error.message}`);
    });
  } else {
    console.log('Workflow completed successfully.');
  }
} catch (e) {
  // A list of all critical errors can be found here:
  // https://linkedapi.io/sdks/handling-results-and-errors/#handling-critical-errors
  if (e instanceof LinkedApiError) {
    console.error(`Critical Error - Type: ${e.type}, Message: ${e.message}`);
  } else {
    console.error('An unexpected, non-API error occurred:', e);
  }
}
```

```python
from linkedapi import EndorsePersonSkillParams, LinkedApiError

try:
    workflow = linkedapi.endorse_person_skill.execute(
        EndorsePersonSkillParams(
            person_url="https://www.linkedin.com/in/person1",
            skill_name="Project Management",
        )
    )

    result = linkedapi.endorse_person_skill.result(workflow.workflow_id)
    errors = result.errors

    # The list of possible execution errors is below
    if errors:
        print("Workflow completed with execution errors:")
        for error in errors:
            print(f" - Type: {error.type}, Message: {error.message}")
    else:
        print("Workflow completed successfully.")
except LinkedApiError as e:
    # A list of all critical errors can be found here:
    # https://linkedapi.io/sdks/handling-results-and-errors/#handling-critical-errors
    print(f"Critical Error - Type: {e.type}, Message: {e.message}")
except Exception as error:
    print("An unexpected, non-API error occurred:", error)
```

## Params

- `personUrl` – [public or hashed](/faq/what-are-hashed-url-and-public-url) LinkedIn URL of the person whose skill you want to endorse.
- `skillName` – name of the skill to endorse, up to 200 characters. It must equal the skill's name on the person's profile; letter case and extra spaces are ignored. It is not a pattern. Skill names are shown as the profile owner entered them, in the owner's language, whatever your own LinkedIn language: a German profile lists `Projektmanagement`, not `Project Management`.

The method searches the person's full skills list, not only the top skills shown on their profile page.

## Data

The method doesn't return any data.

## Errors

- `personNotFound` – provided URL is not an existing LinkedIn person.
- `connectionNotFound` – person is not your 1st-degree connection, so LinkedIn doesn't let you endorse their skills.
- `skillNotFound` – person's profile has no skill with this name.
- `endorsementUnavailable` – person has the skill, but LinkedIn offers no way to endorse it, for example because they turned endorsements off.
- `limitExceeded` – the account has reached its `stEndorsements` [limit](/sdks/admin-limits#limit-categories), so the skill was not endorsed. Every successful endorsement counts toward this limit, including one where the skill was already endorsed.

See the [`st.endorsePersonSkill` action reference](/docs/action-st-endorse-person-skill) for the complete response contract.
