Triggered when a user completes an achievement.
The webhook event.
The webhook event type.
achievement.completed
The user who completed the achievement.
Show child attributes
The ID of the user in your database. Must be a string.
"user-id"
The user's email address.
"[email protected]"
The name of the user.
"John Doe"
The user's timezone.
"Europe/London"
The user's device tokens.
The device token.
["token1", "token2"]
Whether the user is opted into receiving Trophy-powered emails.
true
User attributes as key-value pairs. Keys must match existing user attributes set up in the Trophy dashboard.
{ "department": "engineering", "role": "developer"}
Whether the user is in the control group, meaning they do not receive emails or other communications from Trophy.
false
The date and time the user was created, in ISO 8601 format.
"2021-01-01T00:00:00Z"
The date and time the user was last updated, in ISO 8601 format.
The achievement completion that occurred.
The unique ID of the achievement.
The name of this achievement.
The trigger of the achievement.
metric
streak
api
The description of this achievement.
The URL of the badge image for the achievement, if one has been uploaded.
The key used to reference this achievement in the API (only applicable if trigger = 'api')
The date and time the achievement was completed, in ISO 8601 format. Null if the achievement has not been completed.
The length of the streak required to complete the achievement (only applicable if trigger = 'streak')
The ID of the metric associated with this achievement (only applicable if trigger = 'metric')
The value of the metric required to complete the achievement (only applicable if trigger = 'metric')
The name of the metric associated with this achievement (only applicable if trigger = 'metric')
Return a 200 status to indicate the webhook was received and processed.
Was this page helpful?