[{"data":1,"prerenderedAt":1538},["ShallowReactive",2],{"navigation_docs":3,"-webhooks-receive-deliveries":132,"-webhooks-receive-deliveries-surround":1533},[4,26,32,53,90,103],{"title":5,"path":6,"stem":7,"children":8,"page":25},"Getting Started","\u002Fgetting-started","1.getting-started",[9,13,17,21],{"title":10,"path":11,"stem":12},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":14,"path":15,"stem":16},"Authentication","\u002Fgetting-started\u002Fauthentication","1.getting-started\u002F2.authentication",{"title":18,"path":19,"stem":20},"Campaign setup","\u002Fgetting-started\u002Fcampaigns","1.getting-started\u002F3.campaigns",{"title":22,"path":23,"stem":24},"AI agent skills","\u002Fgetting-started\u002Fai-agent-skills","1.getting-started\u002F4.ai-agent-skills",false,{"title":27,"path":28,"stem":29,"children":30},"Templates","\u002Ftemplates","2.templates\u002Findex",[31],{"title":27,"path":28,"stem":29},{"title":33,"path":34,"stem":35,"children":36,"page":25},"Campaigns","\u002Fcampaigns","3.campaigns",[37,41,45,49],{"title":38,"path":39,"stem":40},"Create campaign","\u002Fcampaigns\u002Fcreate-campaign","3.campaigns\u002F1.create-campaign",{"title":42,"path":43,"stem":44},"Fetch campaign","\u002Fcampaigns\u002Ffetch-campaign","3.campaigns\u002F2.fetch-campaign",{"title":46,"path":47,"stem":48},"List campaigns","\u002Fcampaigns\u002Flist-campaigns","3.campaigns\u002F3.list-campaigns",{"title":50,"path":51,"stem":52},"Activate campaign","\u002Fcampaigns\u002Factivate-campaign","3.campaigns\u002F4.activate-campaign",{"title":54,"path":55,"stem":56,"children":57,"page":25},"Recipients","\u002Frecipients","4.recipients",[58,62,66,70,74,78,82,86],{"title":59,"path":60,"stem":61},"Create recipients","\u002Frecipients\u002Fcreate-recipients","4.recipients\u002F1.create-recipients",{"title":63,"path":64,"stem":65},"Fetch recipient","\u002Frecipients\u002Ffetch-recipient","4.recipients\u002F2.fetch-recipient",{"title":67,"path":68,"stem":69},"Fetch recipient preview","\u002Frecipients\u002Ffetch-recipient-preview","4.recipients\u002F3.fetch-recipient-preview",{"title":71,"path":72,"stem":73},"Create HTML recipient","\u002Frecipients\u002Fcreate-html-recipient","4.recipients\u002F4.create-html-recipient",{"title":75,"path":76,"stem":77},"Checkout recipients","\u002Frecipients\u002Fcheckout-recipients","4.recipients\u002F5.checkout-recipients",{"title":79,"path":80,"stem":81},"PNG API","\u002Frecipients\u002Fpng-api","4.recipients\u002F6.png-api",{"title":83,"path":84,"stem":85},"List recipients","\u002Frecipients\u002Flist-recipients","4.recipients\u002F7.list-recipients",{"title":87,"path":88,"stem":89},"Create bulk HTML recipients","\u002Frecipients\u002Fcreate-bulk-html-recipients","4.recipients\u002F8.create-bulk-html-recipients",{"title":91,"path":92,"stem":93,"children":94,"page":25},"Partner Workflows","\u002Fpartner-workflows","5.partner-workflows",[95,99],{"title":96,"path":97,"stem":98},"Create partner team","\u002Fpartner-workflows\u002Fcreate-partner-team","5.partner-workflows\u002F1.create-partner-team",{"title":100,"path":101,"stem":102},"Account status","\u002Fpartner-workflows\u002Faccount-status","5.partner-workflows\u002F2.account-status",{"title":104,"path":105,"stem":106,"children":107,"page":25},"Webhooks","\u002Fwebhooks","6.webhooks",[108,112,116,120,124,128],{"title":109,"path":110,"stem":111},"Overview","\u002Fwebhooks\u002Foverview","6.webhooks\u002F0.overview",{"title":113,"path":114,"stem":115},"Manage subscriptions","\u002Fwebhooks\u002Fmanage-subscriptions","6.webhooks\u002F1.manage-subscriptions",{"title":117,"path":118,"stem":119},"Recipient events","\u002Fwebhooks\u002Frecipient-events","6.webhooks\u002F2.recipient-events",{"title":121,"path":122,"stem":123},"QR scan events","\u002Fwebhooks\u002Fqr-code-scans","6.webhooks\u002F3.qr-code-scans",{"title":125,"path":126,"stem":127},"Receive deliveries","\u002Fwebhooks\u002Freceive-deliveries","6.webhooks\u002F4.receive-deliveries",{"title":129,"path":130,"stem":131},"Test and resend","\u002Fwebhooks\u002Ftest-and-resend","6.webhooks\u002F5.test-and-resend",{"id":133,"title":125,"body":134,"description":1527,"extension":1528,"links":1529,"meta":1530,"navigation":381,"path":126,"seo":1531,"stem":127,"__hash__":1532},"docs\u002F6.webhooks\u002F4.receive-deliveries.md",{"type":135,"value":136,"toc":1519},"minimark",[137,154,159,224,325,329,340,673,678,694,1188,1191,1195,1202,1209,1213,1222,1228,1232,1235,1258,1261,1277,1509,1515],[138,139,140,141,145,146,153],"p",{},"Scribeless sends each event as a signed HTTPS ",[142,143,144],"code",{},"POST"," request to your subscription URL. Signatures follow the ",[147,148,152],"a",{"href":149,"rel":150},"https:\u002F\u002Fwww.standardwebhooks.com",[151],"nofollow","Standard Webhooks"," specification.",[155,156,158],"h2",{"id":157},"delivery-request","Delivery request",[160,161,166],"pre",{"className":162,"code":163,"language":164,"meta":165,"style":165},"language-http shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Content-Type: application\u002Fjson\nUser-Agent: Scribeless-Webhooks\u002F1.0\nwebhook-id: EVENT_ID\nwebhook-timestamp: UNIX_TIMESTAMP\nwebhook-signature: v1,SIGNATURE\nX-Scribeless-Event: recipient.shipped\nX-Scribeless-Delivery: DELIVERY_ID\nX-Scribeless-Timestamp: UNIX_TIMESTAMP\nX-Scribeless-Signature: sha256=SIGNATURE\n","http","",[142,167,168,176,182,188,194,200,206,212,218],{"__ignoreMap":165},[169,170,173],"span",{"class":171,"line":172},"line",1,[169,174,175],{},"Content-Type: application\u002Fjson\n",[169,177,179],{"class":171,"line":178},2,[169,180,181],{},"User-Agent: Scribeless-Webhooks\u002F1.0\n",[169,183,185],{"class":171,"line":184},3,[169,186,187],{},"webhook-id: EVENT_ID\n",[169,189,191],{"class":171,"line":190},4,[169,192,193],{},"webhook-timestamp: UNIX_TIMESTAMP\n",[169,195,197],{"class":171,"line":196},5,[169,198,199],{},"webhook-signature: v1,SIGNATURE\n",[169,201,203],{"class":171,"line":202},6,[169,204,205],{},"X-Scribeless-Event: recipient.shipped\n",[169,207,209],{"class":171,"line":208},7,[169,210,211],{},"X-Scribeless-Delivery: DELIVERY_ID\n",[169,213,215],{"class":171,"line":214},8,[169,216,217],{},"X-Scribeless-Timestamp: UNIX_TIMESTAMP\n",[169,219,221],{"class":171,"line":220},9,[169,222,223],{},"X-Scribeless-Signature: sha256=SIGNATURE\n",[225,226,227,240],"table",{},[228,229,230],"thead",{},[231,232,233,237],"tr",{},[234,235,236],"th",{},"Header",[234,238,239],{},"Description",[241,242,243,258,268,282,292,307],"tbody",{},[231,244,245,251],{},[246,247,248],"td",{},[142,249,250],{},"webhook-id",[246,252,253,254,257],{},"Event ID. Matches ",[142,255,256],{},"id"," in the body and stays the same across retries and resends.",[231,259,260,265],{},[246,261,262],{},[142,263,264],{},"webhook-timestamp",[246,266,267],{},"Unix timestamp, in seconds, when the attempt was signed.",[231,269,270,275],{},[246,271,272],{},[142,273,274],{},"webhook-signature",[246,276,277,278,281],{},"One or more space-separated ",[142,279,280],{},"v1,\u003Csignature>"," values. There are two during a secret rotation overlap.",[231,283,284,289],{},[246,285,286],{},[142,287,288],{},"X-Scribeless-Event",[246,290,291],{},"Event type.",[231,293,294,299],{},[246,295,296],{},[142,297,298],{},"X-Scribeless-Delivery",[246,300,301,302,306],{},"Delivery ID. Use it with ",[147,303,305],{"href":304},"\u002Fwebhooks\u002Ftest-and-resend#resend-a-delivery","resend",".",[231,308,309,318],{},[246,310,311,314,315],{},[142,312,313],{},"X-Scribeless-Timestamp",", ",[142,316,317],{},"X-Scribeless-Signature",[246,319,320,321,306],{},"Legacy signature. See ",[147,322,324],{"href":323},"#legacy-signature","Legacy signature",[155,326,328],{"id":327},"verify-signatures","Verify signatures",[138,330,331,332,335,336,339],{},"Verify every request before trusting it. Any Standard Webhooks library works with the subscription ",[142,333,334],{},"secret"," as it is returned, including the ",[142,337,338],{},"whsec_"," prefix.",[160,341,345],{"className":342,"code":343,"language":344,"meta":165,"style":165},"language-js shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Webhook } from 'standardwebhooks'\n\nconst webhook = new Webhook(process.env.SCRIBELESS_WEBHOOK_SECRET)\n\nexport async function handleScribelessWebhook(request) {\n  const rawBody = await request.text()\n\n  const event = webhook.verify(rawBody, {\n    'webhook-id': request.headers.get('webhook-id'),\n    'webhook-timestamp': request.headers.get('webhook-timestamp'),\n    'webhook-signature': request.headers.get('webhook-signature'),\n  })\n\n  await queueForProcessing(event)\n  return new Response(null, { status: 204 })\n}\n","js",[142,346,347,377,383,414,418,445,471,475,502,540,573,606,615,620,636,667],{"__ignoreMap":165},[169,348,349,353,357,361,364,367,370,374],{"class":171,"line":172},[169,350,352],{"class":351},"s7zQu","import",[169,354,356],{"class":355},"sMK4o"," {",[169,358,360],{"class":359},"sTEyZ"," Webhook",[169,362,363],{"class":355}," }",[169,365,366],{"class":351}," from",[169,368,369],{"class":355}," '",[169,371,373],{"class":372},"sfazB","standardwebhooks",[169,375,376],{"class":355},"'\n",[169,378,379],{"class":171,"line":178},[169,380,382],{"emptyLinePlaceholder":381},true,"\n",[169,384,385,389,392,395,398,401,404,406,409,411],{"class":171,"line":184},[169,386,388],{"class":387},"spNyl","const",[169,390,391],{"class":359}," webhook ",[169,393,394],{"class":355},"=",[169,396,397],{"class":355}," new",[169,399,360],{"class":400},"s2Zo4",[169,402,403],{"class":359},"(process",[169,405,306],{"class":355},[169,407,408],{"class":359},"env",[169,410,306],{"class":355},[169,412,413],{"class":359},"SCRIBELESS_WEBHOOK_SECRET)\n",[169,415,416],{"class":171,"line":190},[169,417,382],{"emptyLinePlaceholder":381},[169,419,420,423,426,429,432,435,439,442],{"class":171,"line":196},[169,421,422],{"class":351},"export",[169,424,425],{"class":387}," async",[169,427,428],{"class":387}," function",[169,430,431],{"class":400}," handleScribelessWebhook",[169,433,434],{"class":355},"(",[169,436,438],{"class":437},"sHdIc","request",[169,440,441],{"class":355},")",[169,443,444],{"class":355}," {\n",[169,446,447,450,453,456,459,462,464,467],{"class":171,"line":202},[169,448,449],{"class":387},"  const",[169,451,452],{"class":359}," rawBody",[169,454,455],{"class":355}," =",[169,457,458],{"class":351}," await",[169,460,461],{"class":359}," request",[169,463,306],{"class":355},[169,465,466],{"class":400},"text",[169,468,470],{"class":469},"swJcz","()\n",[169,472,473],{"class":171,"line":208},[169,474,382],{"emptyLinePlaceholder":381},[169,476,477,479,482,484,487,489,492,494,497,500],{"class":171,"line":214},[169,478,449],{"class":387},[169,480,481],{"class":359}," event",[169,483,455],{"class":355},[169,485,486],{"class":359}," webhook",[169,488,306],{"class":355},[169,490,491],{"class":400},"verify",[169,493,434],{"class":469},[169,495,496],{"class":359},"rawBody",[169,498,499],{"class":355},",",[169,501,444],{"class":355},[169,503,504,507,509,512,515,517,519,522,524,527,529,531,533,535,537],{"class":171,"line":220},[169,505,506],{"class":355},"    '",[169,508,250],{"class":469},[169,510,511],{"class":355},"'",[169,513,514],{"class":355},":",[169,516,461],{"class":359},[169,518,306],{"class":355},[169,520,521],{"class":359},"headers",[169,523,306],{"class":355},[169,525,526],{"class":400},"get",[169,528,434],{"class":469},[169,530,511],{"class":355},[169,532,250],{"class":372},[169,534,511],{"class":355},[169,536,441],{"class":469},[169,538,539],{"class":355},",\n",[169,541,543,545,547,549,551,553,555,557,559,561,563,565,567,569,571],{"class":171,"line":542},10,[169,544,506],{"class":355},[169,546,264],{"class":469},[169,548,511],{"class":355},[169,550,514],{"class":355},[169,552,461],{"class":359},[169,554,306],{"class":355},[169,556,521],{"class":359},[169,558,306],{"class":355},[169,560,526],{"class":400},[169,562,434],{"class":469},[169,564,511],{"class":355},[169,566,264],{"class":372},[169,568,511],{"class":355},[169,570,441],{"class":469},[169,572,539],{"class":355},[169,574,576,578,580,582,584,586,588,590,592,594,596,598,600,602,604],{"class":171,"line":575},11,[169,577,506],{"class":355},[169,579,274],{"class":469},[169,581,511],{"class":355},[169,583,514],{"class":355},[169,585,461],{"class":359},[169,587,306],{"class":355},[169,589,521],{"class":359},[169,591,306],{"class":355},[169,593,526],{"class":400},[169,595,434],{"class":469},[169,597,511],{"class":355},[169,599,274],{"class":372},[169,601,511],{"class":355},[169,603,441],{"class":469},[169,605,539],{"class":355},[169,607,609,612],{"class":171,"line":608},12,[169,610,611],{"class":355},"  }",[169,613,614],{"class":469},")\n",[169,616,618],{"class":171,"line":617},13,[169,619,382],{"emptyLinePlaceholder":381},[169,621,623,626,629,631,634],{"class":171,"line":622},14,[169,624,625],{"class":351},"  await",[169,627,628],{"class":400}," queueForProcessing",[169,630,434],{"class":469},[169,632,633],{"class":359},"event",[169,635,614],{"class":469},[169,637,639,642,644,647,649,652,654,657,659,663,665],{"class":171,"line":638},15,[169,640,641],{"class":351},"  return",[169,643,397],{"class":355},[169,645,646],{"class":400}," Response",[169,648,434],{"class":469},[169,650,651],{"class":355},"null,",[169,653,356],{"class":355},[169,655,656],{"class":469}," status",[169,658,514],{"class":355},[169,660,662],{"class":661},"sbssI"," 204",[169,664,363],{"class":355},[169,666,614],{"class":469},[169,668,670],{"class":171,"line":669},16,[169,671,672],{"class":355},"}\n",[138,674,675,677],{},[142,676,491],{}," throws if the signature does not match or the timestamp is more than five minutes from the current time.",[138,679,680,681,684,685,687,688,691,692,306],{},"To verify without a library, compute an HMAC-SHA256 of ",[142,682,683],{},"{webhook-id}.{webhook-timestamp}.{rawBody}",". The key is the base64-decoded part of the secret after ",[142,686,338],{},". Compare the base64 digest with each ",[142,689,690],{},"v1,"," value in ",[142,693,274],{},[160,695,697],{"className":342,"code":696,"language":344,"meta":165,"style":165},"import crypto from 'node:crypto'\n\nconst TOLERANCE_SECONDS = 5 * 60\n\nexport function verifyScribelessWebhook({ rawBody, id, timestamp, signatureHeader, secret }) {\n  if (Math.abs(Date.now() \u002F 1000 - Number(timestamp)) > TOLERANCE_SECONDS) {\n    return false\n  }\n\n  const key = Buffer.from(secret.replace(\u002F^whsec_\u002F, ''), 'base64')\n  const expected = crypto\n    .createHmac('sha256', key)\n    .update(`${id}.${timestamp}.${rawBody}`)\n    .digest()\n\n  return signatureHeader.split(' ').some((value) => {\n    const [version, signature] = value.split(',')\n    const received = Buffer.from(signature ?? '', 'base64')\n    return version === 'v1'\n      && received.length === expected.length\n      && crypto.timingSafeEqual(received, expected)\n  })\n}\n",[142,698,699,716,720,738,742,781,842,851,856,860,914,926,949,986,995,999,1037,1076,1112,1130,1152,1176,1183],{"__ignoreMap":165},[169,700,701,703,706,709,711,714],{"class":171,"line":172},[169,702,352],{"class":351},[169,704,705],{"class":359}," crypto ",[169,707,708],{"class":351},"from",[169,710,369],{"class":355},[169,712,713],{"class":372},"node:crypto",[169,715,376],{"class":355},[169,717,718],{"class":171,"line":178},[169,719,382],{"emptyLinePlaceholder":381},[169,721,722,724,727,729,732,735],{"class":171,"line":184},[169,723,388],{"class":387},[169,725,726],{"class":359}," TOLERANCE_SECONDS ",[169,728,394],{"class":355},[169,730,731],{"class":661}," 5",[169,733,734],{"class":355}," *",[169,736,737],{"class":661}," 60\n",[169,739,740],{"class":171,"line":190},[169,741,382],{"emptyLinePlaceholder":381},[169,743,744,746,748,751,754,756,758,761,763,766,768,771,773,776,779],{"class":171,"line":196},[169,745,422],{"class":351},[169,747,428],{"class":387},[169,749,750],{"class":400}," verifyScribelessWebhook",[169,752,753],{"class":355},"({",[169,755,452],{"class":437},[169,757,499],{"class":355},[169,759,760],{"class":437}," id",[169,762,499],{"class":355},[169,764,765],{"class":437}," timestamp",[169,767,499],{"class":355},[169,769,770],{"class":437}," signatureHeader",[169,772,499],{"class":355},[169,774,775],{"class":437}," secret",[169,777,778],{"class":355}," })",[169,780,444],{"class":355},[169,782,783,786,789,792,794,797,799,802,804,807,810,813,816,819,822,824,827,830,833,836,839],{"class":171,"line":202},[169,784,785],{"class":351},"  if",[169,787,788],{"class":469}," (",[169,790,791],{"class":359},"Math",[169,793,306],{"class":355},[169,795,796],{"class":400},"abs",[169,798,434],{"class":469},[169,800,801],{"class":359},"Date",[169,803,306],{"class":355},[169,805,806],{"class":400},"now",[169,808,809],{"class":469},"() ",[169,811,812],{"class":355},"\u002F",[169,814,815],{"class":661}," 1000",[169,817,818],{"class":355}," -",[169,820,821],{"class":400}," Number",[169,823,434],{"class":469},[169,825,826],{"class":359},"timestamp",[169,828,829],{"class":469},")) ",[169,831,832],{"class":355},">",[169,834,835],{"class":359}," TOLERANCE_SECONDS",[169,837,838],{"class":469},") ",[169,840,841],{"class":355},"{\n",[169,843,844,847],{"class":171,"line":208},[169,845,846],{"class":351},"    return",[169,848,850],{"class":849},"sfNiH"," false\n",[169,852,853],{"class":171,"line":214},[169,854,855],{"class":355},"  }\n",[169,857,858],{"class":171,"line":220},[169,859,382],{"emptyLinePlaceholder":381},[169,861,862,864,867,869,872,874,876,878,880,882,885,887,889,892,894,896,898,901,903,905,907,910,912],{"class":171,"line":542},[169,863,449],{"class":387},[169,865,866],{"class":359}," key",[169,868,455],{"class":355},[169,870,871],{"class":359}," Buffer",[169,873,306],{"class":355},[169,875,708],{"class":400},[169,877,434],{"class":469},[169,879,334],{"class":359},[169,881,306],{"class":355},[169,883,884],{"class":400},"replace",[169,886,434],{"class":469},[169,888,812],{"class":355},[169,890,891],{"class":351},"^",[169,893,338],{"class":372},[169,895,812],{"class":355},[169,897,499],{"class":355},[169,899,900],{"class":355}," ''",[169,902,441],{"class":469},[169,904,499],{"class":355},[169,906,369],{"class":355},[169,908,909],{"class":372},"base64",[169,911,511],{"class":355},[169,913,614],{"class":469},[169,915,916,918,921,923],{"class":171,"line":575},[169,917,449],{"class":387},[169,919,920],{"class":359}," expected",[169,922,455],{"class":355},[169,924,925],{"class":359}," crypto\n",[169,927,928,931,934,936,938,941,943,945,947],{"class":171,"line":608},[169,929,930],{"class":355},"    .",[169,932,933],{"class":400},"createHmac",[169,935,434],{"class":469},[169,937,511],{"class":355},[169,939,940],{"class":372},"sha256",[169,942,511],{"class":355},[169,944,499],{"class":355},[169,946,866],{"class":359},[169,948,614],{"class":469},[169,950,951,953,956,958,961,963,966,968,971,973,975,977,979,981,984],{"class":171,"line":617},[169,952,930],{"class":355},[169,954,955],{"class":400},"update",[169,957,434],{"class":469},[169,959,960],{"class":355},"`${",[169,962,256],{"class":359},[169,964,965],{"class":355},"}",[169,967,306],{"class":372},[169,969,970],{"class":355},"${",[169,972,826],{"class":359},[169,974,965],{"class":355},[169,976,306],{"class":372},[169,978,970],{"class":355},[169,980,496],{"class":359},[169,982,983],{"class":355},"}`",[169,985,614],{"class":469},[169,987,988,990,993],{"class":171,"line":622},[169,989,930],{"class":355},[169,991,992],{"class":400},"digest",[169,994,470],{"class":469},[169,996,997],{"class":171,"line":638},[169,998,382],{"emptyLinePlaceholder":381},[169,1000,1001,1003,1005,1007,1010,1012,1014,1016,1018,1020,1023,1025,1027,1030,1032,1035],{"class":171,"line":669},[169,1002,641],{"class":351},[169,1004,770],{"class":359},[169,1006,306],{"class":355},[169,1008,1009],{"class":400},"split",[169,1011,434],{"class":469},[169,1013,511],{"class":355},[169,1015,369],{"class":355},[169,1017,441],{"class":469},[169,1019,306],{"class":355},[169,1021,1022],{"class":400},"some",[169,1024,434],{"class":469},[169,1026,434],{"class":355},[169,1028,1029],{"class":437},"value",[169,1031,441],{"class":355},[169,1033,1034],{"class":387}," =>",[169,1036,444],{"class":355},[169,1038,1040,1043,1046,1049,1051,1054,1057,1059,1062,1064,1066,1068,1070,1072,1074],{"class":171,"line":1039},17,[169,1041,1042],{"class":387},"    const",[169,1044,1045],{"class":355}," [",[169,1047,1048],{"class":359},"version",[169,1050,499],{"class":355},[169,1052,1053],{"class":359}," signature",[169,1055,1056],{"class":355},"]",[169,1058,455],{"class":355},[169,1060,1061],{"class":359}," value",[169,1063,306],{"class":355},[169,1065,1009],{"class":400},[169,1067,434],{"class":469},[169,1069,511],{"class":355},[169,1071,499],{"class":372},[169,1073,511],{"class":355},[169,1075,614],{"class":469},[169,1077,1079,1081,1084,1086,1088,1090,1092,1094,1097,1100,1102,1104,1106,1108,1110],{"class":171,"line":1078},18,[169,1080,1042],{"class":387},[169,1082,1083],{"class":359}," received",[169,1085,455],{"class":355},[169,1087,871],{"class":359},[169,1089,306],{"class":355},[169,1091,708],{"class":400},[169,1093,434],{"class":469},[169,1095,1096],{"class":359},"signature",[169,1098,1099],{"class":355}," ??",[169,1101,900],{"class":355},[169,1103,499],{"class":355},[169,1105,369],{"class":355},[169,1107,909],{"class":372},[169,1109,511],{"class":355},[169,1111,614],{"class":469},[169,1113,1115,1117,1120,1123,1125,1128],{"class":171,"line":1114},19,[169,1116,846],{"class":351},[169,1118,1119],{"class":359}," version",[169,1121,1122],{"class":355}," ===",[169,1124,369],{"class":355},[169,1126,1127],{"class":372},"v1",[169,1129,376],{"class":355},[169,1131,1133,1136,1138,1140,1143,1145,1147,1149],{"class":171,"line":1132},20,[169,1134,1135],{"class":355},"      &&",[169,1137,1083],{"class":359},[169,1139,306],{"class":355},[169,1141,1142],{"class":359},"length",[169,1144,1122],{"class":355},[169,1146,920],{"class":359},[169,1148,306],{"class":355},[169,1150,1151],{"class":359},"length\n",[169,1153,1155,1157,1160,1162,1165,1167,1170,1172,1174],{"class":171,"line":1154},21,[169,1156,1135],{"class":355},[169,1158,1159],{"class":359}," crypto",[169,1161,306],{"class":355},[169,1163,1164],{"class":400},"timingSafeEqual",[169,1166,434],{"class":469},[169,1168,1169],{"class":359},"received",[169,1171,499],{"class":355},[169,1173,920],{"class":359},[169,1175,614],{"class":469},[169,1177,1179,1181],{"class":171,"line":1178},22,[169,1180,611],{"class":355},[169,1182,614],{"class":469},[169,1184,1186],{"class":171,"line":1185},23,[169,1187,672],{"class":355},[138,1189,1190],{},"Use the raw body exactly as received. Do not stringify a parsed JSON object before verifying.",[155,1192,1194],{"id":1193},"respond","Respond",[138,1196,1197,1198,1201],{},"Respond with any ",[142,1199,1200],{},"2xx"," status within 5 seconds. Any other status, a timeout, or a connection error counts as a failure and is retried. Acknowledge first and do slow work in the background.",[138,1203,1204,1205,1208],{},"Redirects are not followed, so a ",[142,1206,1207],{},"3xx"," response is a failure.",[155,1210,1212],{"id":1211},"process-idempotently","Process idempotently",[138,1214,1215,1216,1218,1219,1221],{},"Delivery is at least once, so the same event can arrive more than once. Use the event ",[142,1217,256],{},", also sent as ",[142,1220,250],{},", as your idempotency key and ignore events you have already processed.",[138,1223,1224,1225,306],{},"Events are not guaranteed to arrive in order. See ",[147,1226,117],{"href":1227},"\u002Fwebhooks\u002Frecipient-events#ordering",[155,1229,1231],{"id":1230},"retries","Retries",[138,1233,1234],{},"Failed deliveries are retried after about 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and 10 hours: eight attempts over roughly 28 hours. Each retry is re-signed with a new timestamp.",[138,1236,1237,1238,1241,1242,1245,1246,1249,1250,1254,1255,1257],{},"If a subscription keeps failing for 5 days without a single successful delivery, Scribeless disables it. The subscription's ",[142,1239,1240],{},"status"," becomes ",[142,1243,1244],{},"inactive"," and ",[142,1247,1248],{},"disabled_reason"," explains why. Fix your endpoint, ",[147,1251,1253],{"href":1252},"\u002Fwebhooks\u002Fmanage-subscriptions#update-a-subscription","re-enable the subscription",", and ",[147,1256,305],{"href":304}," anything you missed.",[155,1259,324],{"id":1260},"legacy-signature",[138,1262,1263,1264,1266,1267,1270,1271,1273,1274,306],{},"Integrations built before Standard Webhooks signing can keep verifying the ",[142,1265,317],{}," header. It is an HMAC-SHA256 of ",[142,1268,1269],{},"{X-Scribeless-Timestamp}.{rawBody}",", keyed with the full secret string including ",[142,1272,338],{},", and sent as ",[142,1275,1276],{},"sha256=\u003Chex digest>",[160,1278,1280],{"className":342,"code":1279,"language":344,"meta":165,"style":165},"import crypto from 'node:crypto'\n\nexport function verifyLegacyScribelessWebhook({ rawBody, timestamp, signature, secret }) {\n  const expected = 'sha256=' + crypto\n    .createHmac('sha256', secret)\n    .update(`${timestamp}.${rawBody}`)\n    .digest('hex')\n\n  if (signature.length !== expected.length) {\n    return false\n  }\n\n  return crypto.timingSafeEqual(\n    Buffer.from(signature),\n    Buffer.from(expected),\n  )\n}\n",[142,1281,1282,1296,1300,1329,1349,1369,1393,1410,1414,1439,1445,1449,1453,1466,1483,1500,1505],{"__ignoreMap":165},[169,1283,1284,1286,1288,1290,1292,1294],{"class":171,"line":172},[169,1285,352],{"class":351},[169,1287,705],{"class":359},[169,1289,708],{"class":351},[169,1291,369],{"class":355},[169,1293,713],{"class":372},[169,1295,376],{"class":355},[169,1297,1298],{"class":171,"line":178},[169,1299,382],{"emptyLinePlaceholder":381},[169,1301,1302,1304,1306,1309,1311,1313,1315,1317,1319,1321,1323,1325,1327],{"class":171,"line":184},[169,1303,422],{"class":351},[169,1305,428],{"class":387},[169,1307,1308],{"class":400}," verifyLegacyScribelessWebhook",[169,1310,753],{"class":355},[169,1312,452],{"class":437},[169,1314,499],{"class":355},[169,1316,765],{"class":437},[169,1318,499],{"class":355},[169,1320,1053],{"class":437},[169,1322,499],{"class":355},[169,1324,775],{"class":437},[169,1326,778],{"class":355},[169,1328,444],{"class":355},[169,1330,1331,1333,1335,1337,1339,1342,1344,1347],{"class":171,"line":190},[169,1332,449],{"class":387},[169,1334,920],{"class":359},[169,1336,455],{"class":355},[169,1338,369],{"class":355},[169,1340,1341],{"class":372},"sha256=",[169,1343,511],{"class":355},[169,1345,1346],{"class":355}," +",[169,1348,925],{"class":359},[169,1350,1351,1353,1355,1357,1359,1361,1363,1365,1367],{"class":171,"line":196},[169,1352,930],{"class":355},[169,1354,933],{"class":400},[169,1356,434],{"class":469},[169,1358,511],{"class":355},[169,1360,940],{"class":372},[169,1362,511],{"class":355},[169,1364,499],{"class":355},[169,1366,775],{"class":359},[169,1368,614],{"class":469},[169,1370,1371,1373,1375,1377,1379,1381,1383,1385,1387,1389,1391],{"class":171,"line":202},[169,1372,930],{"class":355},[169,1374,955],{"class":400},[169,1376,434],{"class":469},[169,1378,960],{"class":355},[169,1380,826],{"class":359},[169,1382,965],{"class":355},[169,1384,306],{"class":372},[169,1386,970],{"class":355},[169,1388,496],{"class":359},[169,1390,983],{"class":355},[169,1392,614],{"class":469},[169,1394,1395,1397,1399,1401,1403,1406,1408],{"class":171,"line":208},[169,1396,930],{"class":355},[169,1398,992],{"class":400},[169,1400,434],{"class":469},[169,1402,511],{"class":355},[169,1404,1405],{"class":372},"hex",[169,1407,511],{"class":355},[169,1409,614],{"class":469},[169,1411,1412],{"class":171,"line":214},[169,1413,382],{"emptyLinePlaceholder":381},[169,1415,1416,1418,1420,1422,1424,1426,1429,1431,1433,1435,1437],{"class":171,"line":220},[169,1417,785],{"class":351},[169,1419,788],{"class":469},[169,1421,1096],{"class":359},[169,1423,306],{"class":355},[169,1425,1142],{"class":359},[169,1427,1428],{"class":355}," !==",[169,1430,920],{"class":359},[169,1432,306],{"class":355},[169,1434,1142],{"class":359},[169,1436,838],{"class":469},[169,1438,841],{"class":355},[169,1440,1441,1443],{"class":171,"line":542},[169,1442,846],{"class":351},[169,1444,850],{"class":849},[169,1446,1447],{"class":171,"line":575},[169,1448,855],{"class":355},[169,1450,1451],{"class":171,"line":608},[169,1452,382],{"emptyLinePlaceholder":381},[169,1454,1455,1457,1459,1461,1463],{"class":171,"line":617},[169,1456,641],{"class":351},[169,1458,1159],{"class":359},[169,1460,306],{"class":355},[169,1462,1164],{"class":400},[169,1464,1465],{"class":469},"(\n",[169,1467,1468,1471,1473,1475,1477,1479,1481],{"class":171,"line":622},[169,1469,1470],{"class":359},"    Buffer",[169,1472,306],{"class":355},[169,1474,708],{"class":400},[169,1476,434],{"class":469},[169,1478,1096],{"class":359},[169,1480,441],{"class":469},[169,1482,539],{"class":355},[169,1484,1485,1487,1489,1491,1493,1496,1498],{"class":171,"line":638},[169,1486,1470],{"class":359},[169,1488,306],{"class":355},[169,1490,708],{"class":400},[169,1492,434],{"class":469},[169,1494,1495],{"class":359},"expected",[169,1497,441],{"class":469},[169,1499,539],{"class":355},[169,1501,1502],{"class":171,"line":669},[169,1503,1504],{"class":469},"  )\n",[169,1506,1507],{"class":171,"line":1039},[169,1508,672],{"class":355},[138,1510,1511,1512,1514],{},"The legacy signature only uses the current secret, so it does not support rotation overlaps. Use ",[142,1513,274],{}," for new integrations.",[1516,1517,1518],"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 .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":165,"searchDepth":178,"depth":178,"links":1520},[1521,1522,1523,1524,1525,1526],{"id":157,"depth":178,"text":158},{"id":327,"depth":178,"text":328},{"id":1193,"depth":178,"text":1194},{"id":1211,"depth":178,"text":1212},{"id":1230,"depth":178,"text":1231},{"id":1260,"depth":178,"text":324},"Verify, acknowledge, and process Scribeless webhook deliveries.","md",null,{},{"title":125,"description":1527},"XNwX0i1Z1-vEPveGumx-vHdOozTHbI88hJxOqkKhlzo",[1534,1536],{"title":121,"path":122,"stem":123,"description":1535,"children":-1},"Receive signed webhook events when Smart QR codes are scanned.",{"title":129,"path":130,"stem":131,"description":1537,"children":-1},"Send test events, inspect delivery history, and resend webhook deliveries.",1791997866577]