Widgets

Update widget

Partially update a widget. Only the fields you include in the

PATCH /api/v3/widgets/{id} Try It

Update widget

cURL
curl --request PATCH \
  --url https://api.example.com/v3/widgets/wdg_abc123 \
  --header 'Authorization: Bearer your-api-token' \
  --header 'content-type: application/json' \
  --data '{"name":"string","colour":"red","quantity":0}'
200 application/json
{
  "id": "wdg_abc123",
  "name": "My renamed widget",
  "colour": "green",
  "quantity": 20,
  "created_at": "2026-05-11T09:30:00Z",
  "updated_at": "2026-05-11T10:05:00Z"
}

Partially update a widget. Only the fields you include in the request body are changed.

Headers

  • Authorization string required header

    Bearer your-api-token

  • Accept string required header

    application/json

  • Content-Type string required header

    application/json

Path parameters

  • id string required path

    The widget's unique identifier (e.g. wdg_abc123).

Body parameters

  • name string body
  • colour string body
  • quantity integer body

Response codes

HTTP status
  • 200

    Widget updated.

  • 401

    Unauthorized — invalid or missing API token.

  • 404

    Not found — widget does not exist.

  • 422

    Validation Error — invalid parameters.