How to Create Guest (V1/guest-carts) masked id by REST API Magento 2?

Create a Guest Customer cart token by API V1/guest-carts in Magento to create an empty cart token.

Action: POST

URL: <WEBSITE_URL>/rest/<STORE_CODE>/V1/guest-carts  (Example, https://magento.test/rest/default/V1/guest-carts)

Payload: Empty

Response: fQtl1bxLdxud1fFEP68znOAPnAFFpjVh

The API’s response will be a random string called masked_id and you can see this masked_id value from the quote_id_mask table in the database.

You may also be interested in Guest Place Order Flow REST API Magento 2.