---
title: "Update badge rule"
method: PATCH
path: "/api/badge-rules/{id}"
tags: ["Badge Rules"]
---

# Update badge rule

`PATCH /api/badge-rules/{id}`

## Request

- Base URL: `https://dregs.com`
- URL: `https://dregs.com/api/badge-rules/{id}`
- Auth: HTTP bearer

Updates a badge rule

## Path parameters

- `id` integer, required

## Request body

- V1UpdateBadgeRuleRequest
  - `name` string
  - `type` 'GOOD' | 'BAD' | 'NEUTRAL'
  - `conditions` RuleCondition[]
    - `condition` string
    - `category` string
    - `threshold` integer
    - `badge` string
    - `seconds` integer
  - `priority` integer
  - `applyDelaySeconds` integer
  - `removeDelaySeconds` integer
  - `enabled` boolean

## Response `200`

Badge rule updated

## Other responses

- `404`: Badge rule not found

---

[API](https://skmtc.dev/dregs/apis/dregs-api.md) · [All operations](https://skmtc.dev/dregs/apis/dregs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dregs/apis/dregs-api/revisions/ea71f8c1eed4?raw)
