Update a widget

PUT /widgets/{id}

Path parameters

  • id string(uuid) Required

    The unique identifier of a widget.

application/json

Body Required

  • name string Required

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • id string(uuid)
    • created_at string(date-time)
    • updated_at string(date-time)
  • 400 application/problem+json

    Bad Request

    Hide response attributes Show response attributes object
    • title string Required

      A short, human-readable summary of the problem.

    • detail string

      A human-readable explanation specific to this occurrence of the problem.

    • status integer Required

      The HTTP status code generated by the origin server for this occurrence of the problem.

    • errors array[object]

      A list of validation errors that occurred while processing the request.

      Hide errors attributes Show errors attributes object
      • message string Required

        A human-readable message describing the error.

      • code string Required

        A machine-readable code representing the error.

      • pointer string

        A pointer to the specific part of the request that caused the error.

  • 404 application/problem+json

    Widget not found

    Hide response attributes Show response attributes object
    • title string Required

      A short, human-readable summary of the problem.

    • detail string

      A human-readable explanation specific to this occurrence of the problem.

    • status integer Required

      The HTTP status code generated by the origin server for this occurrence of the problem.

    • errors array[object]

      A list of validation errors that occurred while processing the request.

      Hide errors attributes Show errors attributes object
      • message string Required

        A human-readable message describing the error.

      • code string Required

        A machine-readable code representing the error.

      • pointer string

        A pointer to the specific part of the request that caused the error.

PUT /widgets/{id}
curl \
 --request PUT 'https://example.com/widgets/{id}' \
 --header "Content-Type: application/json" \
 --data '{"name":"Goblin Staff of Sparks"}'
Request examples
{
  "name": "Goblin Staff of Sparks"
}
Response examples (200)
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2025-05-04T09:42:00Z",
  "updated_at": "2025-05-04T09:42:00Z"
}
Response examples (400)
{
  "title": "string",
  "detail": "string",
  "status": 42,
  "errors": [
    {
      "message": "string",
      "code": "string",
      "pointer": "string"
    }
  ]
}
Response examples (404)
{
  "title": "string",
  "detail": "string",
  "status": 42,
  "errors": [
    {
      "message": "string",
      "code": "string",
      "pointer": "string"
    }
  ]
}