---
title: "Update a player rating"
method: PATCH
path: "/v1/users/{user_id}/ratings/{id}"
tags: ["Player Ratings"]
---

# Update a player rating

`PATCH /v1/users/{user_id}/ratings/{id}`

## Request

- Base URL: `https://api.hify.club`
- URL: `https://api.hify.club/v1/users/{user_id}/ratings/{id}`
- Auth: API key in header `X-User-Token`

## Request body

- object
  - `rating` object
    - `rating` number
    - `source` 'self_rated' | 'facility' | 'dupr' | 'itr' | 'hify'
    - `facility_id` integer, nullable

## Response `200`

Rating updated

- PlayerRating
  - `id` integer
  - `rating` number
  - `source` 'self_rated' | 'facility' | 'dupr' | 'itr' | 'hify'
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `sport` object: Serialized sport object
  - `facility` object, nullable: Serialized facility object (null when source is not facility)

## Other responses

- `401`: Unauthorized
- `404`: User or rating not found
- `422`: Unprocessable entity

---

[API](https://skmtc.dev/hify/apis/hify-apis.md) - [All operations](https://skmtc.dev/hify/apis/hify-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/hify/apis/hify-apis/revisions/b5920403538d?raw)
