[{"data":1,"prerenderedAt":321},["ShallowReactive",2],{"docs-nav":3,"docs-\u002Fdocs\u002Fapi\u002Funsubscribe":70},[4,10,14,19,23,26,29,33,36,40,43,47,50,54,58,62,66],{"title":5,"path":6,"order":7,"section":8,"group":9},"Concepts","\u002Fdocs\u002Fapi\u002Fconcepts",1,"api",null,{"title":11,"path":12,"order":7,"section":13,"group":9},"Introduction","\u002Fdocs","general",{"title":15,"path":16,"order":7,"section":17,"group":18},"Usage","\u002Fdocs\u002Fsdk\u002Fusage","sdk","Script",{"title":20,"path":21,"order":22,"section":8,"group":9},"\u002Fv1\u002Fme","\u002Fdocs\u002Fapi\u002Fme",2,{"title":24,"path":25,"order":22,"section":13,"group":9},"Getting started","\u002Fdocs\u002Fgetting-started",{"title":24,"path":27,"order":22,"section":17,"group":28},"\u002Fdocs\u002Fsdk\u002Fpackage","Package",{"title":30,"path":31,"order":32,"section":8,"group":9},"\u002Fv1\u002Fsubscribe","\u002Fdocs\u002Fapi\u002Fsubscribe",3,{"title":34,"path":35,"order":32,"section":17,"group":28},"Browser client","\u002Fdocs\u002Fsdk\u002Fpackage\u002Fclient",{"title":37,"path":38,"order":39,"section":8,"group":9},"\u002Fv1\u002Funsubscribe","\u002Fdocs\u002Fapi\u002Funsubscribe",4,{"title":41,"path":42,"order":39,"section":17,"group":28},"Server client","\u002Fdocs\u002Fsdk\u002Fpackage\u002Fserver",{"title":44,"path":45,"order":46,"section":8,"group":9},"\u002Fv1\u002Fevents","\u002Fdocs\u002Fapi\u002Fevents",5,{"title":48,"path":49,"order":46,"section":17,"group":28},"Types","\u002Fdocs\u002Fsdk\u002Fpackage\u002Ftypes",{"title":51,"path":52,"order":53,"section":8,"group":9},"\u002Fv1\u002Fsend","\u002Fdocs\u002Fapi\u002Fsend",6,{"title":55,"path":56,"order":57,"section":8,"group":9},"\u002Fv1\u002Fbroadcasts","\u002Fdocs\u002Fapi\u002Fbroadcasts",7,{"title":59,"path":60,"order":61,"section":8,"group":9},"\u002Fv1\u002Fgroups","\u002Fdocs\u002Fapi\u002Fgroups",8,{"title":63,"path":64,"order":65,"section":8,"group":9},"\u002Fv1\u002Fsubscribers","\u002Fdocs\u002Fapi\u002Fsubscribers",9,{"title":67,"path":68,"order":69,"section":8,"group":9},"Webhooks","\u002Fdocs\u002Fapi\u002Fwebhooks",10,{"id":71,"title":37,"apiModule":9,"body":72,"description":313,"extension":314,"generated":315,"group":9,"meta":316,"navigation":317,"order":39,"path":38,"section":8,"seo":318,"stem":319,"__hash__":320},"docs\u002Fdocs\u002Fapi\u002Funsubscribe.md",{"type":73,"value":74,"toc":310},"minimark",[75,82,100,107,122,141,152,157,202,207,233,242,273,280,285,306],[76,77,79],"h1",{"id":78},"v1unsubscribe",[80,81,37],"code",{},[83,84,85,86,89,90,93,94,99],"p",{},"Project auth (",[80,87,88],{},"?project="," query param or ",[80,91,92],{},"X-LitePush-Project"," header). See ",[95,96,98],"a",{"href":97},"\u002Fdocs\u002Fapi\u002Fconcepts#authentication","Concepts → Authentication",".",[101,102,104],"h2",{"id":103},"post-v1unsubscribe",[80,105,106],{},"POST \u002Fv1\u002Funsubscribe",[83,108,109,113,114,117,118,121],{},[110,111,112],"strong",{},"What it does:"," Flips a subscriber's ",[80,115,116],{},"status"," to ",[80,119,120],{},"'unsubscribed'"," so we stop sending pushes to that endpoint. The row stays in the database (preserves analytics history and lets the same user re-opt-in later without losing their event history).",[83,123,124,127,128,131,132,135,136,140],{},[110,125,126],{},"When to use it:"," Almost never. The SDK's ",[80,129,130],{},"litepush.unsubscribe()"," calls this when the user opts out, and the service worker beacons it on ",[80,133,134],{},"pushsubscriptionchange"," (when the browser invalidates the subscription). For hard-delete (GDPR erasure that wipes the row), use ",[95,137,138],{"href":64},[80,139,63],{}," instead.",[83,142,143,146,147,89,149,151],{},[110,144,145],{},"Authentication:"," Project — ",[80,148,88],{},[80,150,92],{}," header.",[83,153,154],{},[110,155,156],{},"Request body:",[158,159,160,179],"table",{},[161,162,163],"thead",{},[164,165,166,170,173,176],"tr",{},[167,168,169],"th",{},"Field",[167,171,172],{},"Type",[167,174,175],{},"Required",[167,177,178],{},"Description",[180,181,182],"tbody",{},[164,183,184,190,193,196],{},[185,186,187],"td",{},[80,188,189],{},"endpoint",[185,191,192],{},"string (URL, ≤ 2048 chars)",[185,194,195],{},"yes",[185,197,198,199,99],{},"The push endpoint URL to unsubscribe. Same value used at ",[80,200,201],{},"POST \u002Fv1\u002Fsubscribe",[83,203,204],{},[110,205,206],{},"Example:",[208,209,214],"pre",{"className":210,"code":211,"language":212,"meta":213,"style":213},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -X POST 'https:\u002F\u002Fapi.litepush.dev\u002Fv1\u002Funsubscribe?project=prj_xxxxxxxx' \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"endpoint\": \"https:\u002F\u002Ffcm.googleapis.com\u002Ffcm\u002Fsend\u002FcZxJ...\" }'\n","sh","",[80,215,216,223,228],{"__ignoreMap":213},[217,218,220],"span",{"class":219,"line":7},"line",[217,221,222],{},"curl -X POST 'https:\u002F\u002Fapi.litepush.dev\u002Fv1\u002Funsubscribe?project=prj_xxxxxxxx' \\\n",[217,224,225],{"class":219,"line":22},[217,226,227],{},"  -H \"Content-Type: application\u002Fjson\" \\\n",[217,229,230],{"class":219,"line":32},[217,231,232],{},"  -d '{ \"endpoint\": \"https:\u002F\u002Ffcm.googleapis.com\u002Ffcm\u002Fsend\u002FcZxJ...\" }'\n",[83,234,235],{},[110,236,237,238,241],{},"Success — ",[80,239,240],{},"200 OK",":",[208,243,247],{"className":244,"code":245,"language":246,"meta":213,"style":213},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{ \"ok\": true }\n","json",[80,248,249],{"__ignoreMap":213},[217,250,251,255,258,262,265,267,270],{"class":219,"line":7},[217,252,254],{"class":253},"sMK4o","{",[217,256,257],{"class":253}," \"",[217,259,261],{"class":260},"spNyl","ok",[217,263,264],{"class":253},"\"",[217,266,241],{"class":253},[217,268,269],{"class":253}," true",[217,271,272],{"class":253}," }\n",[83,274,275,276,279],{},"Returns ",[80,277,278],{},"200"," even when the endpoint isn't on file — the operation is idempotent (you can't tell \"already unsubscribed\" from \"never subscribed\", and neither matters operationally).",[83,281,282],{},[110,283,284],{},"Errors:",[286,287,288,295,301],"ul",{},[289,290,291,294],"li",{},[80,292,293],{},"400 missing_project"," — no project param\u002Fheader.",[289,296,297,300],{},[80,298,299],{},"404 project_not_found"," — project doesn't exist.",[289,302,303,99],{},[80,304,305],{},"429 rate_limited",[307,308,309],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":213,"searchDepth":22,"depth":22,"links":311},[312],{"id":103,"depth":22,"text":106},"Soft-unsubscribe a browser by its push endpoint. Project-authed; idempotent.","md",false,{},true,{"title":37,"description":313},"docs\u002Fapi\u002Funsubscribe","6Qnh9RPFY3oFN-834cUnxKDDl7cHlgTvCfJO2yOLNWA",1780560203630]