> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XblAchievementUnlockEvent

> XblAchievementUnlockEvent

# XblAchievementUnlockEvent

Represents an Achievement Unlock notification received from the notification service.

## Syntax

```cpp theme={null}
typedef struct XblAchievementUnlockEvent {  
    const char* achievementName;  
    const char* achievementDescription;  
    const char* achievementIcon;  
    const char* achievementId;  
    uint64_t gamerscore;  
    uint32_t titleId;  
    uint64_t xboxUserId;  
    const char* deepLink;  
    float rarityPercentage;  
    XblAchievementRarityCategory rarityCategory;  
    time_t timeUnlocked;  
} XblAchievementUnlockEvent  
```

### Members

*achievementName*\
Type: const char\*

The name of the achievement in the locale of the DeviceEndpoint to which it's being sent (current char limit: 44).

*achievementDescription*\
Type: const char\*

The description of the achievement in the locale of the DeviceEndpoint to which it's being sent.

*achievementIcon*\
Type: const char\*

The URL to the image associated to the achievement (max length: 2048).

*achievementId*\
Type: const char\*

The base 10 ID of the title the achievement is defined for.

*gamerscore*\
Type: uint64\_t

The amount of gamerscore earned for unlocking the achievement (can be 0 - challenges cannot have gamerscore).

*titleId*\
Type: uint32\_t

The base 10 ID of the title the achievement is defined for.

*xboxUserId*\
Type: uint64\_t

The person's XBOX user identifier.

*deepLink*\
Type: const char\*

The deep link set on the achievement.

*rarityPercentage*\
Type: float

The ratio of the count of users who have unlocked the achievement / the total number unique users of that title expressed as a fractional value >= 0.0 and \<= 1.0 rounded to 2 decimal places.

*rarityCategory*\
Type: [XblAchievementRarityCategory](/reference/live/xsapi-c/achievements_c/enums/xblachievementraritycategory)

"Rare" or "Common" - where Rare achievements are those with a rarityPercentage \<= 9% (or 0.9) and "Common" is everything else. (This string is not localized).

*timeUnlocked*\
Type: time\_t

The timestamp when the achievement was first unlocked for this user.

## Requirements

**Header:** achievements\_c.h

## See also

[achievements\_c](/reference/live/xsapi-c/achievements_c/achievements_c_members)


## Related topics

- [XblAchievementUnlockHandler](/reference/live/xsapi-c/achievements_c/functions/xblachievementunlockhandler.md)
- [XblAchievementUnlockAddNotificationHandler](/reference/live/xsapi-c/achievements_c/functions/xblachievementunlockaddnotificationhandler.md)
- [XblAchievementUnlockRemoveNotificationHandler](/reference/live/xsapi-c/achievements_c/functions/xblachievementunlockremovenotificationhandler.md)
- [XblAchievementsManagerEvent](/reference/live/xsapi-c/achievements_manager_c/structs/xblachievementsmanagerevent.md)
- [XblAchievementsManagerEventType](/reference/live/xsapi-c/achievements_manager_c/enums/xblachievementsmanagereventtype.md)
