API - Inventory_items PUT error message

I am trying to update the cost of items using the PUT API.

myshopify.com/admin/api/2024-04/inventory_items/42956524683431.json?cost=123.55

But I get the error Required parameter missing or invalid.

The GET with this URL works fine.