---
title: "Create a badge achievement"
method: POST
path: "/api/badge_achievements"
tags: ["badge_achievements"]
---

# Create a badge achievement

`POST /api/badge_achievements`

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.

## Request body

- object
  - `badge_achievement` object
    - `user_id` integer, required
    - `badge_id` integer, required
    - `rewarding_context_message_markdown` string
    - `include_default_description` boolean
    - `metadata` object

## Response `201`

created

- BadgeAchievement — Representation of a badge achievement
  - `id` integer, required
  - `user_id` integer, required
  - `badge_id` integer, required
  - `rewarding_context_message_markdown` string, nullable
  - `include_default_description` boolean
  - `metadata` object — Key/value data supplied for context
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `409` — conflict
- `422` — unprocessable

## Changes

- **2026-08-24** (v1) `5417594f9d64` — 4 info
  - added the new optional request property `badge_achievement/metadata`
  - added the non-success response with the status `409`
  - added the non-success response with the status `422`
  - added the optional property `metadata` to the response with the `201` status
- **2026-07-13** (v1) `189b62b952ea` — 1 info
  - endpoint added
- **2026-07-13** (v1) `7db6ba099285` — 1 info
  - endpoint added
- **2023-01-10** (v1) `754f8b25f815` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/badge_achievements/post.md)

---

[API](https://skmtc.dev/forem/apis/forem-api-v1.md) · [All operations](https://skmtc.dev/forem/apis/forem-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/forem/forem-api-v1/revisions/1f64f71fc2a7/schema)
