> For the complete documentation index, see [llms.txt](https://the-wishlist-documentation.gitbook.io/the-wishlist-documentation-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://the-wishlist-documentation.gitbook.io/the-wishlist-documentation-docs/wishlist-rest-api/wishlists/createwishlist.md).

# createWishlist

Creates a new wishlist for a specified customer. Either **customer** ***id*** or ***customerRef*** is mandatory. ***name*** (wishlist name) is also mandatory

The Customer must be created before creating their wishlist(s).

```json
{"openapi":"3.0.3","info":{"title":"Wishlist REST API","version":"0.0.1"},"tags":[{"name":"wishlists","description":"Create, read, update and delete wishlists, and look them up by id, reference or customer."}],"servers":[{"url":"https://api.au-aws.thewishlist.io/services/wsservice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","description":"OAuth2 bearer token issued by TWC Keycloak, sent as `Bearer <token>`."}},"parameters":{"X-TWC-Tenant-2":{"name":"X-TWC-Tenant","in":"header","required":false,"description":"tenant-key (your retail store's unique identifier in TWC)","schema":{"type":"string"}}},"schemas":{"WishlistDto":{"type":"object","properties":{"attributeGroups":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeGroupDto"}},"createdTime":{"type":"string","format":"date-time"},"customerId":{"type":"string"},"customerRef":{"type":"string"},"deleted":{"type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"isPrivate":{"type":"boolean"},"itemCount":{"type":"integer","format":"int32"},"lastEvaluatedItemId":{"type":"string"},"modifiedTime":{"type":"string","format":"date-time"},"name":{"type":"string"},"wishlistItems":{"type":"array","items":{"$ref":"#/components/schemas/WishlistItemDto"}},"wishlistRef":{"type":"string"}},"title":"WishlistDto"},"AttributeGroupDto":{"type":"object","properties":{"attributes":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}},"title":"AttributeGroupDto"},"WishlistItemDto":{"type":"object","properties":{"addedByStaff":{"type":"boolean"},"addedFromCart":{"type":"boolean"},"attributeGroups":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/AttributeGroupDto"}},"createdTime":{"type":"string","format":"date-time"},"datePurchased":{"type":"string","format":"date-time"},"disableNotification":{"type":"boolean"},"id":{"type":"string"},"locationId":{"type":"string"},"locationRef":{"type":"string"},"modifiedTime":{"type":"string","format":"date-time"},"notifyMe":{"type":"boolean"},"prerelease":{"type":"boolean"},"product":{"$ref":"#/components/schemas/ProductDto"},"purchased":{"type":"boolean"},"purchasedAndRemoved":{"type":"boolean"},"staffRef":{"type":"string"},"wishlistId":{"type":"string"},"wishlistItemRef":{"type":"string"},"wishlistRef":{"type":"string"}},"title":"WishlistItemDto"},"ProductDto":{"type":"object","properties":{"oldVariantId":{"type":"string"},"oldVariantRef":{"type":"string"},"productId":{"type":"string"},"productRef":{"type":"string"},"selectedVariantId":{"type":"string"},"selectedVariantRef":{"type":"string"}},"title":"ProductDto"}}},"paths":{"/api/wishlists":{"post":{"summary":"createWishlist","operationId":"createWishlistUsingPOST","parameters":[{"$ref":"#/components/parameters/X-TWC-Tenant-2"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"attributeGroups":{"type":"object","description":"attributeGroups are optional fields that extend the TWC data model to allow you to capture additional custom fields","properties":{"property1":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}},"property2":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}}}},"customerId":{"type":"string","description":"Generated automatically by TWC"},"customerRef":{"type":"string","description":"All create requests should include this value which is the retailer's customer identifier.  However it is not mandatory."},"deleted":{"type":"boolean","description":"Used by TWC to indicate the field is deleted."},"description":{"type":"string"},"isPrivate":{"type":"boolean"},"name":{"type":"string"},"wishlistItems":{"type":"array","items":{"type":"object","properties":{"addedByStaff":{"type":"boolean"},"addedFromCart":{"type":"boolean"},"attributeGroups":{"type":"object","properties":{"property1":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}},"property2":{"type":"object","properties":{"attributes":{"type":"object","properties":{"property1":{"type":"string"},"property2":{"type":"string"}}},"description":{"type":"string"}}}}},"datePurchased":{"type":"string"},"disableNotification":{"type":"boolean"},"locationId":{"type":"string"},"locationRef":{"type":"string"},"notifyMe":{"type":"boolean"},"prerelease":{"type":"boolean"},"product":{"type":"object","properties":{"oldVariantId":{"type":"string"},"oldVariantRef":{"type":"string"},"productId":{"type":"string"},"productRef":{"type":"string"},"selectedVariantId":{"type":"string"},"selectedVariantRef":{"type":"string"}}},"purchased":{"type":"boolean"},"purchasedAndRemoved":{"type":"boolean"},"staffRef":{"type":"string"},"wishlistId":{"type":"string"},"wishlistItemRef":{"type":"string"},"wishlistRef":{"type":"string"}}}},"wishlistRef":{"type":"string"}}}}},"description":"wishlist","required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WishlistDto"}}}},"201":{"description":"Created"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"deprecated":false,"description":"Creates a new wishlist for a specified customer.  Either **customer** ***id*** or ***customerRef*** is mandatory.   ***name*** (wishlist name) is also mandatory\n\nThe Customer must be created before creating their wishlist(s).","tags":["wishlists"]}}}}
```
