badge_achievements

Create a badge achievement

Award a badge to a user. Requires administrator privileges.

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 body

Response

created

idinteger required
user_idinteger required
badge_idinteger required
rewarding_context_message_markdownstring nullable
include_default_descriptionboolean
metadataobject

Key/value data supplied for context

created_atstring date-time required
updated_atstring date-time required

Changes

Changed in 4 of the 59 revisions of this API.16

    • added the new optional request property badge_achievement/metadata

      new-optional-request-property

    • added the non-success response with the status 409

      response-non-success-status-added

    • added the non-success response with the status 422

      response-non-success-status-added

    • added the optional property metadata to the response with the 201 status

      response-optional-property-added

    • endpoint added

      endpoint-added

    • endpoint added

      endpoint-added

    • api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 31 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog