DELETE/v1/sessions/{session}/memory
What ✕ does for a guest: this shopper's ref no longer reopens the design.
What it does
The designer calls it itself when a guest closes it (Close · Delete project, or Close after the link was emailed); your server may call it too, say when a guest signs in or out. The session's customer_ref stops reopening or listing the session's design, and its open designer links on that design stop working. The design itself stays with the shop: its emailed link, if one was sent, still opens it anywhere (link says whether there is one). A guest's design is deleted 7 days after its last change, link or not. Clear your page's own tab memory too (embed.js does it on close).
Send the key: Authorization: Bearer sk_test_… or sk_live_….
curl -X DELETE "https://printwisp.com/v1/sessions/dss_3f9c1a7e5b2d8c40/memory" \
-H "Authorization: Bearer $PRINTWISP_KEY"
# 200
{ "forgotten": 2, "link": true }<?php
$ch = curl_init('https://printwisp.com/v1/sessions/dss_3f9c1a7e5b2d8c40/memory');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('PRINTWISP_KEY'), 'Content-Type: application/json'],
]);
$answer = json_decode(curl_exec($ch), true);// Node (your server). The key never reaches a browser.
const r = await fetch('https://printwisp.com/v1/sessions/dss_3f9c1a7e5b2d8c40/memory', {
method: 'DELETE',
headers: { Authorization: 'Bearer ' + process.env.PRINTWISP_KEY },
});
const answer = await r.json();import os, requests
r = requests.delete(
"https://printwisp.com/v1/sessions/dss_3f9c1a7e5b2d8c40/memory",
headers={"Authorization": f"Bearer {os.environ['PRINTWISP_KEY']}"},
)
answer = r.json()Parameters
| Parameter | Type | Description |
|---|---|---|
session required | string | The session id (dss_…) POST /v1/sessions answered. |
Response
200 application/json. Forgotten. forgotten: how many of the shopper's sessions on that design; link: an emailed link still opens it.
Errors
| HTTP | error | message |
|---|---|---|
| 401 | unauthorized | Send Authorization: Bearer <secret key>. Keys are made in PrintWisp, on your store's Overview → API keys. |
| 404 | session_not_found | No such designer session. |