Create Widget

POST /widgets
application/json

Body Required

Widget to create

  • name string Required

Responses

  • 201

    Created

  • 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.

POST /widgets
curl \
 --request POST 'https://example.com/widgets' \
 --header "Content-Type: application/json" \
 --data '{"name":"Goblin Staff of Sparks"}'
Request examples
{
  "name": "Goblin Staff of Sparks"
}
Response examples (400)
{
  "title": "string",
  "detail": "string",
  "status": 42,
  "errors": [
    {
      "message": "string",
      "code": "string",
      "pointer": "string"
    }
  ]
}