# Update gamification settings

`PATCH https://api.cademi.com.br/api/v3/settings/gamification`

Operation ID: `settings.gamification.update` · API v3

Updates the gamification settings. Only the fields included in the request are changed, and triggers omitted from `triggers` are left unchanged.

A trigger's `points` value must be at least 1. To stop a trigger from awarding points, set its `enabled` field to `false`.

Requires the `gamification.update` permission. To avoid overwriting a newer version, send the `ETag` returned by the retrieve operation in the `If-Match` header. The header is optional; when it is omitted, the update is applied to the current revision.

Required permissions: `gamification.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`.

Schema: object.

## Responses

### 200

Returns the updated gamification settings.

Body: `data`: SettingsGamification.

Fields of SettingsGamification:

| Field | Type | Required | Description |
|---|---|---|---|
| `comment_scoring` | string, one of `once`, `unlimited` | yes | Whether comments earn points once per lesson (once) or every time (unlimited). |
| `defaults` | object | yes |  |
| `enabled` | boolean | yes |  |
| `object` | string, one of `settings` | yes |  |
| `replica` | object | yes |  |
| `revision` | string | yes |  |
| `show_full_name` | boolean | yes |  |
| `show_to_students` | boolean | yes |  |
| `triggers` | object | yes | One trigger per scoring action. points must be at least 1; use enabled to turn a trigger off. |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 412

The gamification settings have changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
