badge_achievements
Create a badge achievement
Changed onAward a badge to a user. Requires administrator privileges. Successful writes log api_badge_achievement_create with the actor and target ids in the admin API audit log.
Integration Tips:
- user_id: The numeric ID of the user receiving the badge.
- badge_id: The numeric ID of the badge being awarded.
- rewarding_context_message_markdown: Optional personalized message shown in the notification or profile feed to explain why the user was awarded the badge.
- metadata: Optional key/value data stored with the achievement for context.
- If the badge cannot be awarded more than once and the user already holds it, the request is rejected with 409 Conflict, and the conflicting achievement_id is included in the response. A 422 is returned for other request errors.
post/api/badge_achievements
Request
- Base URLhttps://dev.to
- Auth
- API key in header api-key
- or HTTP bearer
Request body
Response
created
Changes
- info
added the new optional request property
/ - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status
- info
- info
endpoint added
- info