# setCollectionAssets

> Mutation in domain **Collections**

- HTML: [setCollectionAssets.html](setCollectionAssets.html)
- Raw SDL: [setCollectionAssets.sdl](setCollectionAssets.sdl)
- Covered by: [llms.txt](../llms.txt)

Replace the existing set of the `Assets` in the `Collection` with the new set of the `Assets`. Requires `basic:write` scope to be accessible and `Project` permission level `EDIT`.

## Returns

`SetCollectionAssets`

## Arguments

- `input`: `SetCollectionAssetsInput!` — `SetCollectionAssets` input argument.

## Example

```graphql
mutation SetCollectionAssets {
  setCollectionAssets(
    input: {
      collectionId: "…"
      assetIds: ["…"]
    }
  ) {
    __typename
    collection {
      name
      id
      assets {
        total
        page
        limit
        hasNextPage
        items { id }
      }
      currentUserPermissions {
        canAddAssets
        canRemoveAssets
      }
    }
  }
}
```

Raw: [`setCollectionAssets.example.sdl`](setCollectionAssets.example.sdl)
