Create ghost user
curl --request POST \
--url https://store.salesive.com/api/v1/auth/ghost \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://store.salesive.com/api/v1/auth/ghost"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://store.salesive.com/api/v1/auth/ghost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/auth/ghost",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/auth/ghost"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/auth/ghost")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/auth/ghost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"email": "jsmith@example.com",
"token": "<string>",
"isGuest": true,
"createdAt": "2023-11-07T05:31:56Z"
}
}Authentication
Create ghost user
Create an anonymous guest user session without requiring authentication.
POST
/
auth
/
ghost
Create ghost user
curl --request POST \
--url https://store.salesive.com/api/v1/auth/ghost \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://store.salesive.com/api/v1/auth/ghost"
payload = {}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://store.salesive.com/api/v1/auth/ghost', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://store.salesive.com/api/v1/auth/ghost",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://store.salesive.com/api/v1/auth/ghost"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://store.salesive.com/api/v1/auth/ghost")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://store.salesive.com/api/v1/auth/ghost")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"status": 123,
"success": true,
"message": "<string>",
"data": {
"_id": "<string>",
"email": "jsmith@example.com",
"token": "<string>",
"isGuest": true,
"createdAt": "2023-11-07T05:31:56Z"
}
}Request
POST /auth/ghost
Content-Type: application/json
x-shop-id: {shopId}
Headers
| Header | Type | Description |
|---|---|---|
Content-Type | string | Always set to application/json. |
x-shop-id | string | Shop 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": "ghost_690a1654ffc615e6ccfc65a6@guest.salesive.com",
"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": {}
}
Headers
Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.
Body
application/json
The body is of type object.
Was this page helpful?
⌘I

