# Create a points adjustment

`POST https://api.cademi.com.br/api/v3/users/{user_id}/score-adjustments`

Operation ID: `users.score_adjustments.create` · API v3

Creates a manual adjustment to the user's points. The adjustment is recorded as a point entry in the points ledger together with its author and `reason`, and the user's balance changes by the adjusted amount.

`points` must be a non-zero integer; negative values deduct points. Use `product_id` to associate the adjustment with a product.

Required permissions: `scores.adjust`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `user_id` | path | string | yes |  |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `points` | integer | yes |  |
| `product_id` | string or null | no |  |
| `reason` | string | yes |  |

## Responses

### 201

Returns the newly created manual adjustment, including the user's resulting balance.

Body: `data`: ScoreAdjustment.

Fields of ScoreAdjustment:

| Field | Type | Required | Description |
|---|---|---|---|
| `author` | object | yes |  |
| `balance_after` | integer | yes |  |
| `created_at` | string (date-time) | yes |  |
| `id` | string | yes |  |
| `object` | string, one of `score_adjustment` | yes |  |
| `points` | integer | yes |  |
| `product_id` | string or null | yes |  |
| `reason` | string | yes |  |
| `score_id` | string | yes |  |
| `user_id` | string | yes |  |

### 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.

### 404

The user or product was not found or is not accessible with the current credentials.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

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