Create Widget

POST /api/widgets
application/json

Body Required

Widget to create

  • name string Required
  • description string Required
  • Additional properties are NOT allowed

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • data array | object Required

      One of:

      This is a widget. It has a name and a description. It can be used to demonstrate the use of components.

    • Additional properties are NOT allowed
  • 400 application/problem+json

    Bad Request

    Hide response attributes Show response attributes object
    • title string
    • detail string
    • code string
    • errors object
      Hide errors attribute Show errors attribute object
      • Additional properties: string
POST /api/widgets
curl \
 -X POST https://example.com/api/widgets \
 -H "Content-Type: application/json" \
 -d '{"name":"Goblin Staff of Sparks","description":"This staff is made of wood and has a small gemstone at the top. It crackles with electricity.\n"}'
Request example
{
  "name": "Goblin Staff of Sparks",
  "description": "This staff is made of wood and has a small gemstone at the top. It crackles with electricity.\n"
}
Response examples (201)
{
  "data": [],
  "links": {}
}
Response examples (400)
{
  "title": "string",
  "detail": "string",
  "code": "string",
  "errors": {
    "Additional properties:": "string"
  }
}