> For the complete documentation index, see [llms.txt](https://gley.gitbook.io/easy-achievements/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gley.gitbook.io/easy-achievements/complete-api/submitachievement.md).

# SubmitAchievement

## Description

Submit an achievement.

## Declaration

```csharp
 public static void SubmitAchievement(AchievementNames achievementName, UnityAction<bool, GameServicesError> submitComplete = null)
```

## Parameters

<table><thead><tr><th width="206">Name</th><th>Description</th></tr></thead><tbody><tr><td><strong>achievementName</strong></td><td><p>AchievementNames is an enum auto-generated when you use the SettingsWindow to set up the plugin.</p><p>It contains all your achievements so it is easy for you to call it from your code</p></td></tr><tr><td><strong>submitComplete</strong></td><td>Callback called after submit process ends.<br>bool true -> achievement submitted successfully <br>bool false -> failed -> you get a <strong>GameServicesError</strong> </td></tr></tbody></table>

## Example

```csharp
using Gley.GameServices;
public class Test : MonoBehaviour
{
    public void SubmitAchievement()
    {
        Gley.GameServices.API.SubmitAchievement(AchievementNames.LowJumper, SubmitComplete);
    }

    private void SubmitComplete(bool success, GameServicesError message)
    {
        if (success)
        {
            //achievement was submitted
        }
        else
        {
            //an error occurred
            Debug.LogError("Achievement failed to submit: " + message);
        }
    }
}
```
