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

# replacePinnedItemsInWidget

> Replaces all pinned items in a widget with the supplied set.



**mutation** `replacePinnedItemsInWidget(input: ReplacePinnedItemsInWidgetInput!): ReplacePinnedItemsInWidgetPayload!`

## Arguments

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

## Returns

`ReplacePinnedItemsInWidgetPayload!`

**`errors`**: `[ReplacePinnedItemsInWidgetError!]`

---

**`widget`**: `Widget`

## Examples

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

```json Variables
{
  "input": {
    "items": [
      {
        "entityId": "string"
      }
    ],
    "itemType": "CARD_DEFINITIONS",
    "widgetId": "id"
  }
}
```

```json Response
{
  "data": {
    "replacePinnedItemsInWidget": {
      "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.