Skip to main content
POST
/
auth
/
ghost
Create ghost user
curl --request POST \
  --url https://store.salesive.com/api/v1/auth/ghost \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-shop-id: <api-key>' \
  --data '{}'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "email": "[email protected]",
    "token": "<string>",
    "isGuest": true,
    "createdAt": "2023-11-07T05:31:56Z"
  }
}

Request

POST /auth/ghost
Content-Type: application/json
x-shop-id: {shopId}

Headers

HeaderTypeDescription
Content-TypestringAlways set to application/json.
x-shop-idstringShop identifier to associate the user with your store.
This endpoint does not require authentication and creates an anonymous guest session for browsing.

Successful response

{
    "status": 201,
    "success": true,
    "message": "Ghost user created successfully",
    "data": {
        "_id": "690a1654ffc615e6ccfc65a6",
        "email": "[email protected]",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "isGuest": true,
        "createdAt": "2025-11-14T15:45:00.000Z"
    }
}
You receive a temporary token that allows guest users to browse, add items to cart, and use the wishlist before registering.

Error response

{
    "status": 500,
    "success": false,
    "message": "Failed to create guest user",
    "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Body

application/json

The body is of type object.

Response

Ghost user created successfully.

status
integer
required
success
boolean
required
message
string
required
data
object
required