> ## Documentation Index
> Fetch the complete documentation index at: https://opendonationassistant.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add widget

> Creates a new widget



## OpenAPI

````yaml /api-reference/oda-widget-service-1.0.0.yml post /widgets/commands/add
openapi: 3.0.1
info:
  title: ODA Widget Service
  description: ODA Widget Service
  contact:
    name: stCarolas
    email: stcarolas@gmail.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.en.html
  version: 1.0.0
servers: []
security: []
paths:
  /widgets/commands/add:
    post:
      summary: Add widget
      description: Creates a new widget
      operationId: addWidget
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddWidgetApi.NewWidgetRequest'
        required: true
      responses:
        '200':
          description: Widget created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WidgetDto'
        '401':
          description: Unauthorized
components:
  schemas:
    AddWidgetApi.NewWidgetRequest:
      required:
        - name
        - sortOrder
        - type
      type: object
      properties:
        type:
          type: string
        sortOrder:
          type: integer
          format: int32
        name:
          type: string
    WidgetDto:
      required:
        - config
        - deleted
        - enabled
        - id
        - name
        - ownerId
        - sortOrder
        - type
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        sortOrder:
          type: integer
          format: int32
        name:
          type: string
        ownerId:
          type: string
        config:
          type: object
          additionalProperties:
            type: object
        enabled:
          type: boolean
        deleted:
          type: boolean

````