---
title: Wishlist
description: Let users save products to wishlists using the Shop Users API's product list mutations.
source_url:
  html: https://shopify.dev/docs/api/shop/guides/use-cases/wishlist
  md: https://shopify.dev/docs/api/shop/guides/use-cases/wishlist.md
---

# Wishlist

Use the Shop Users API to create and manage wishlists for Shop users. Wishlists are built on the product list system, where users can organize saved products into named, shareable collections.

**Developer preview:**

The Shop platform is in early access. Features and APIs may change before general availability.

***

## What you'll learn

In this guide, you'll learn how to do the following tasks:

* Authenticate with the Shop APIs to get a user-scoped access token.
* Create a wishlist for a user.
* Add and remove products from a wishlist.

***

## Requirements

* A [Shop app](https://shopify.dev/docs/api/shop/guides/creating-a-client) with a client ID and secret.
* A user who has connected to your app through Sign in with Shop.

***

## Step 1: Get a user access token

Call the `fetchTokensForUser` mutation on the [Shop Partners API](https://shopify.dev/docs/api/shop-partners/latest) with the user's public ID. Authenticate using your client ID and secret as HTTP Basic credentials.

## cURL

```bash
curl -X POST \
  https://shop.app/api/partners/graphql.json \
  -H 'Content-Type: application/json' \
  -u '{CLIENT_ID}:{CLIENT_SECRET}' \
  -d '{
    "query": "mutation { fetchTokensForUser(publicId: \"USER_PUBLIC_ID\") { accessToken refreshToken expiresIn tokenType } }"
  }'
```

Save the `accessToken` from the response. You'll use it to authenticate requests to the Shop Users API.

***

## Step 2: Create a wishlist

Use the `productListCreate` mutation on the [Shop Users API](https://shopify.dev/docs/api/shop-users/latest) to create a new product list. Include the access token as a Bearer token.

## cURL

```bash
curl -X POST \
  https://shop.app/api/users/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -d '{
    "query": "mutation { productListCreate(name: \"My Wishlist\", privacyStatus: PUBLIC) { productList { id name publicId privacyStatus } userErrors { field message } } }"
  }'
```

The response includes the product list's `id`, which you'll use to add items.

***

## Step 3: Add a product to the wishlist

Use the `productListItemAdd` mutation to add a product variant to the wishlist:

## cURL

```bash
curl -X POST \
  https://shop.app/api/users/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -d '{
    "query": "mutation { productListItemAdd(productListId: \"LIST_ID\", shopifyShopId: 12345, shopifyVariantId: 67890) { productListItem { id shopifyVariantId } userErrors { field message } } }"
  }'
```

***

## Step 4: Remove a product from the wishlist

Use the `productListItemRemove` mutation to remove a product variant:

## cURL

```bash
curl -X POST \
  https://shop.app/api/users/graphql.json \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -d '{
    "query": "mutation { productListItemRemove(productListId: \"LIST_ID\", shopifyVariantId: 67890) { deletedProductListItem { id } userErrors { field message } } }"
  }'
```

***

## Next steps

* Use `productListUpdate` to rename a wishlist or change its privacy status.
* Query a user's wishlists with `user.productLists` to display them in your UI.
* You can also use the `favoritesAdd` and `favoritesRemove` mutations to manage the user's default favorites list without creating a named product list.

***