---
title: "Upvote Resource"
method: PUT
path: "/resources/{id}/upvote"
tags: ["Update Resource"]
---

# Upvote Resource

`PUT /resources/{id}/upvote`

Increments the `upvotes` property of a resource. If the user has already upvoted the resource, `upvotes` property will decrement since a user is limited to only one vote per resource. Also, if the user has already downvoted the resource, hitting this endpoint will increment `upvotes` property while decrementing `downvotes` property.

## Path parameters

- `id` integer, required

## Response `200`

Upvoted resource

- Resource
  - `apiVersion` string — API version
  - `resource` ResourceData
    - `category` string — Category
    - `created_at` string, date-time — Date created
    - `downvotes` integer — Negative ratings
    - `id` integer — Resource ID
    - `last_updated` string, date-time — Date updated
    - `languages` string[] — List of languages
    - `name` string — Resource name
    - `notes` string — Resource notes
    - `free` boolean — True or false for whether resource is free
    - `upvotes` integer — Positive ratings
    - `url` string — Resource url
    - `user_vote_direction` string, nullable — Vote direction of a logged in user
  - `status` string — Status message
  - `status_code` integer — Status code

## Other responses

- `404` — Resource not found

## Changes

- **2026-07-17** `6071d3157f6d` — 1 info
  - added the optional property `resource/user_vote_direction` to the response with the `200` status
- **2020-10-29** `4a6786468aaf` — 11 warning, 4 info
  - removed the optional property `category` from the response with the `200` status
  - removed the optional property `created_at` from the response with the `200` status
  - removed the optional property `downvotes` from the response with the `200` status
  - removed the optional property `free` from the response with the `200` status
  - …11 more
- **2020-10-19** `5f6fef2c1be0` — 1 warning, 1 info
  - removed the optional property `paid` from the response with the `200` status
  - added the optional property `free` to the response with the `200` status
- **2020-05-12** `a1ebd031433f` — 1 warning
  - removed the optional property `data` from the response with the `404` status
- **2020-03-13** `93a275167c61` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/operationcode/apis/operation-code-resources-api/changes/resources/:id/upvote/put.md)

---

[API](https://skmtc.dev/operationcode/apis/operation-code-resources-api.md) · [All operations](https://skmtc.dev/operationcode/apis/operation-code-resources-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/operationcode/operation-code-resources-api/revisions/6071d3157f6d/schema)
