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

# createWidget

> Creates a new landing page widget for the current tenant.



**mutation** `createWidget(input: CreateWidgetInput!): CreateWidgetPayload!`

## Arguments

**`input`**: `CreateWidgetInput!` (required)

## Returns

`CreateWidgetPayload!`

**`errors`**: `[CreateWidgetError!]`

---

**`widget`**: `Widget`

## Examples

```graphql Mutation
mutation CreateWidget($input: CreateWidgetInput!) {
  createWidget(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    widget {
      createdAt
      createdBy
      id
      itemType
      lastModified
      pinnedItems {
        __typename
        ... on PinnedCardDefinition {
          __typename
        }
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "itemType": "CARD_DEFINITIONS",
    "position": 1.5
  }
}
```

```json Response
{
  "data": {
    "createWidget": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "widget": {
        "createdAt": "value",
        "createdBy": "value",
        "id": "id",
        "itemType": "CARD_DEFINITIONS",
        "lastModified": "value",
        "pinnedItems": [
          {
            "__typename": "PinnedCardDefinition"
          }
        ]
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.