[{"data":1,"prerenderedAt":1610},["ShallowReactive",2],{"docs-nav":3,"docs-\u002Fdocs\u002Fdevelopers\u002Frest-api":22},[4,10,14,18],{"path":5,"title":6,"tree":7,"group":8,"order":9},"\u002Fdocs\u002Fagents\u002Fllms-and-agents","llms.txt and agents","agents","Getting started",2,{"path":11,"title":12,"tree":7,"group":8,"order":13},"\u002Fdocs\u002Fagents\u002Fmcp-setup","MCP setup",1,{"path":15,"title":16,"tree":17,"group":8,"order":13},"\u002Fdocs\u002Fdevelopers\u002Fquickstart","Quickstart","developers",{"path":19,"title":20,"tree":17,"group":21,"order":13},"\u002Fdocs\u002Fdevelopers\u002Frest-api","REST API reference","Reference",{"id":23,"title":20,"body":24,"description":1603,"extension":1604,"group":21,"icon":37,"meta":1605,"navigation":1606,"order":13,"path":19,"popular":1606,"seo":1607,"stem":1608,"tree":17,"__hash__":1609},"docs\u002Fdocs\u002Fdevelopers\u002Frest-api.md",{"type":25,"value":26,"toc":1587},"minimark",[27,59,66,71,81,104,107,117,122,153,157,163,203,216,220,226,237,241,247,258,388,392,398,413,652,663,732,744,748,754,764,768,774,799,880,883,915,921,941,1042,1047,1183,1190,1199,1202,1210,1235,1241,1259,1286,1291,1297,1303,1335,1353,1443,1447,1453,1479,1536,1540,1546,1567,1571,1583],[28,29,30,31,35,36,40,41,44,45,48,49,52,53,58],"p",{},"The Pixelhooks API has two surfaces: the ",[32,33,34],"strong",{},"capture endpoint"," under the ",[37,38,39],"code",{},"\u002Fh\u002F","\nprefix, where requests are recorded, and the ",[32,42,43],{},"management API"," under ",[37,46,47],{},"\u002Fapi",",\nwhere you read bins and their captured requests. Capturing and reading are\nanonymous — the bin id is the only credential. A small ",[32,50,51],{},"account-scoped"," surface\n(listing, labelling, and removing the bins you own) sits behind authentication —\nsee ",[54,55,57],"a",{"href":56},"#authenticated-endpoints","Authenticated endpoints",".",[28,60,61,62,65],{},"All examples use ",[37,63,64],{},"https:\u002F\u002Fhooks.pixelhop.io",", the hosted Pixelhooks origin. The\napp, the management API, and the capture endpoint all share this single origin,\nso there are no cross-origin cookies and no CORS to worry about.",[67,68,70],"h2",{"id":69},"capture-endpoint","Capture endpoint",[72,73,78],"pre",{"className":74,"code":76,"language":77},[75],"language-text","ANY \u002Fh\u002F:binId\nANY \u002Fh\u002F:binId\u002F*\n","text",[37,79,76],{"__ignoreMap":80},"",[28,82,83,84,87,88,91,92,95,96,99,100,58],{},"Records the incoming request against the bin and, by default, responds ",[37,85,86],{},"200 OK","\nwith the body ",[37,89,90],{},"OK",". Accepts any HTTP method and any sub-path beneath the bin id;\nthe sub-path is stored as the request's ",[37,93,94],{},"path"," (the bare bin URL records ",[37,97,98],{},"\u002F",").\nThe bin's owner can change what this endpoint returns — status, headers, body,\ncontent-type, and an artificial delay — see ",[54,101,103],{"href":102},"#configure-the-response","Configure the response",[28,105,106],{},"For each request Pixelhooks stores the method, request headers, raw body, query\nstring, the path that was hit, and a received-at timestamp.",[108,109,111],"callout",{"type":110},"info",[28,112,113,114,116],{},"Requests to a bin id that doesn't exist also return ",[37,115,86],{}," — nothing is stored,\nand the response doesn't reveal whether the bin exists.",[28,118,119],{},[32,120,121],{},"Limits",[123,124,125,133,144],"ul",{},[126,127,128,129,132],"li",{},"Each bin keeps only its ",[32,130,131],{},"most recent 100 requests",". When a new request would\nexceed the cap, the oldest is dropped.",[126,134,135,136,139,140,143],{},"Bodies are captured up to ",[32,137,138],{},"1 MB",". Larger bodies are truncated to the cap and\nflagged with ",[37,141,142],{},"truncated: true","; the request is never rejected.",[126,145,146,149,150,58],{},[32,147,148],{},"Anonymous bins idle-expire after 30 days."," A bin that goes 30 days without\nreceiving a request is purged automatically — its captured requests and any\nconfigured response are deleted, and the bin id stops resolving (capture and\nread both behave as if it never existed). Each captured request resets the\ncountdown. Bins created while signed in are claimed by your account and ",[32,151,152],{},"never\nauto-expire",[67,154,156],{"id":155},"create-a-bin","Create a bin",[72,158,161],{"className":159,"code":160,"language":77},[75],"POST \u002Fapi\u002Fbins\n",[37,162,160],{"__ignoreMap":80},[72,164,168],{"className":165,"code":166,"language":167,"meta":80,"style":80},"language-json shiki shiki-themes github-light github-dark","{ \"id\": \"abc123cuid\", \"createdAt\": \"2026-06-19T09:00:00.000Z\" }\n","json",[37,169,170],{"__ignoreMap":80},[171,172,174,178,182,185,189,192,195,197,200],"span",{"class":173,"line":13},"line",[171,175,177],{"class":176},"sVt8B","{ ",[171,179,181],{"class":180},"sj4cs","\"id\"",[171,183,184],{"class":176},": ",[171,186,188],{"class":187},"sZZnC","\"abc123cuid\"",[171,190,191],{"class":176},", ",[171,193,194],{"class":180},"\"createdAt\"",[171,196,184],{"class":176},[171,198,199],{"class":187},"\"2026-06-19T09:00:00.000Z\"",[171,201,202],{"class":176}," }\n",[28,204,205,206,209,210,212,213,58],{},"The ",[37,207,208],{},"id"," doubles as the bin's capture token. The capture URL is the origin plus\n",[37,211,39],{}," and the id: ",[37,214,215],{},"https:\u002F\u002Fhooks.pixelhop.io\u002Fh\u002Fabc123cuid",[67,217,219],{"id":218},"get-bin-metadata","Get bin metadata",[72,221,224],{"className":222,"code":223,"language":77},[75],"GET \u002Fapi\u002Fbins\u002F:binId\n",[37,225,223],{"__ignoreMap":80},[28,227,228,229,232,233,236],{},"Returns ",[37,230,231],{},"{ \"id\", \"createdAt\" }",", or ",[37,234,235],{},"404"," if the bin doesn't exist.",[67,238,240],{"id":239},"list-captured-requests","List captured requests",[72,242,245],{"className":243,"code":244,"language":77},[75],"GET \u002Fapi\u002Fbins\u002F:binId\u002Frequests\n",[37,246,244],{"__ignoreMap":80},[28,248,249,250,253,254,257],{},"Returns lightweight summaries, ",[32,251,252],{},"newest first",". Use ",[37,255,256],{},"get request"," for full\ndetail.",[72,259,261],{"className":165,"code":260,"language":167,"meta":80,"style":80},"[\n  {\n    \"id\": \"req_1\",\n    \"method\": \"POST\",\n    \"path\": \"\u002Fwebhooks\u002Fstripe\",\n    \"query\": \"attempt=2\",\n    \"contentType\": \"application\u002Fjson\",\n    \"bodySize\": 41,\n    \"truncated\": false,\n    \"createdAt\": \"2026-06-19T09:00:05.000Z\"\n  }\n]\n",[37,262,263,268,273,287,300,313,326,339,352,365,376,382],{"__ignoreMap":80},[171,264,265],{"class":173,"line":13},[171,266,267],{"class":176},"[\n",[171,269,270],{"class":173,"line":9},[171,271,272],{"class":176},"  {\n",[171,274,276,279,281,284],{"class":173,"line":275},3,[171,277,278],{"class":180},"    \"id\"",[171,280,184],{"class":176},[171,282,283],{"class":187},"\"req_1\"",[171,285,286],{"class":176},",\n",[171,288,290,293,295,298],{"class":173,"line":289},4,[171,291,292],{"class":180},"    \"method\"",[171,294,184],{"class":176},[171,296,297],{"class":187},"\"POST\"",[171,299,286],{"class":176},[171,301,303,306,308,311],{"class":173,"line":302},5,[171,304,305],{"class":180},"    \"path\"",[171,307,184],{"class":176},[171,309,310],{"class":187},"\"\u002Fwebhooks\u002Fstripe\"",[171,312,286],{"class":176},[171,314,316,319,321,324],{"class":173,"line":315},6,[171,317,318],{"class":180},"    \"query\"",[171,320,184],{"class":176},[171,322,323],{"class":187},"\"attempt=2\"",[171,325,286],{"class":176},[171,327,329,332,334,337],{"class":173,"line":328},7,[171,330,331],{"class":180},"    \"contentType\"",[171,333,184],{"class":176},[171,335,336],{"class":187},"\"application\u002Fjson\"",[171,338,286],{"class":176},[171,340,342,345,347,350],{"class":173,"line":341},8,[171,343,344],{"class":180},"    \"bodySize\"",[171,346,184],{"class":176},[171,348,349],{"class":180},"41",[171,351,286],{"class":176},[171,353,355,358,360,363],{"class":173,"line":354},9,[171,356,357],{"class":180},"    \"truncated\"",[171,359,184],{"class":176},[171,361,362],{"class":180},"false",[171,364,286],{"class":176},[171,366,368,371,373],{"class":173,"line":367},10,[171,369,370],{"class":180},"    \"createdAt\"",[171,372,184],{"class":176},[171,374,375],{"class":187},"\"2026-06-19T09:00:05.000Z\"\n",[171,377,379],{"class":173,"line":378},11,[171,380,381],{"class":176},"  }\n",[171,383,385],{"class":173,"line":384},12,[171,386,387],{"class":176},"]\n",[67,389,391],{"id":390},"get-one-request","Get one request",[72,393,396],{"className":394,"code":395,"language":77},[75],"GET \u002Fapi\u002Fbins\u002F:binId\u002Frequests\u002F:requestId\n",[37,397,395],{"__ignoreMap":80},[28,399,400,401,404,405,408,409,412],{},"Returns the full request. Text-like bodies (text, JSON, form, XML, or anything\nthat decodes as valid UTF-8) are returned decoded in ",[37,402,403],{},"bodyText",". Binary bodies\nreturn ",[37,406,407],{},"isText: false"," and ",[37,410,411],{},"bodyText: null"," — fetch the bytes from the raw\nendpoint instead.",[72,414,416],{"className":165,"code":415,"language":167,"meta":80,"style":80},"{\n  \"id\": \"req_1\",\n  \"binId\": \"abc123cuid\",\n  \"method\": \"POST\",\n  \"path\": \"\u002Fwebhooks\u002Fstripe\",\n  \"query\": \"?attempt=2\",\n  \"headers\": { \"content-type\": \"application\u002Fjson\", \"user-agent\": \"Stripe\u002F1.0\" },\n  \"contentType\": \"application\u002Fjson\",\n  \"bodySize\": 41,\n  \"truncated\": false,\n  \"ip\": \"203.0.113.10\",\n  \"kind\": \"json\",\n  \"isText\": true,\n  \"bodyText\": \"{\\\"event\\\":\\\"payment_intent.succeeded\\\"}\",\n  \"fields\": null,\n  \"hasBody\": true,\n  \"createdAt\": \"2026-06-19T09:00:05.000Z\"\n}\n",[37,417,418,423,434,445,456,467,479,507,518,529,540,552,564,577,611,624,636,646],{"__ignoreMap":80},[171,419,420],{"class":173,"line":13},[171,421,422],{"class":176},"{\n",[171,424,425,428,430,432],{"class":173,"line":9},[171,426,427],{"class":180},"  \"id\"",[171,429,184],{"class":176},[171,431,283],{"class":187},[171,433,286],{"class":176},[171,435,436,439,441,443],{"class":173,"line":275},[171,437,438],{"class":180},"  \"binId\"",[171,440,184],{"class":176},[171,442,188],{"class":187},[171,444,286],{"class":176},[171,446,447,450,452,454],{"class":173,"line":289},[171,448,449],{"class":180},"  \"method\"",[171,451,184],{"class":176},[171,453,297],{"class":187},[171,455,286],{"class":176},[171,457,458,461,463,465],{"class":173,"line":302},[171,459,460],{"class":180},"  \"path\"",[171,462,184],{"class":176},[171,464,310],{"class":187},[171,466,286],{"class":176},[171,468,469,472,474,477],{"class":173,"line":315},[171,470,471],{"class":180},"  \"query\"",[171,473,184],{"class":176},[171,475,476],{"class":187},"\"?attempt=2\"",[171,478,286],{"class":176},[171,480,481,484,487,490,492,494,496,499,501,504],{"class":173,"line":328},[171,482,483],{"class":180},"  \"headers\"",[171,485,486],{"class":176},": { ",[171,488,489],{"class":180},"\"content-type\"",[171,491,184],{"class":176},[171,493,336],{"class":187},[171,495,191],{"class":176},[171,497,498],{"class":180},"\"user-agent\"",[171,500,184],{"class":176},[171,502,503],{"class":187},"\"Stripe\u002F1.0\"",[171,505,506],{"class":176}," },\n",[171,508,509,512,514,516],{"class":173,"line":341},[171,510,511],{"class":180},"  \"contentType\"",[171,513,184],{"class":176},[171,515,336],{"class":187},[171,517,286],{"class":176},[171,519,520,523,525,527],{"class":173,"line":354},[171,521,522],{"class":180},"  \"bodySize\"",[171,524,184],{"class":176},[171,526,349],{"class":180},[171,528,286],{"class":176},[171,530,531,534,536,538],{"class":173,"line":367},[171,532,533],{"class":180},"  \"truncated\"",[171,535,184],{"class":176},[171,537,362],{"class":180},[171,539,286],{"class":176},[171,541,542,545,547,550],{"class":173,"line":378},[171,543,544],{"class":180},"  \"ip\"",[171,546,184],{"class":176},[171,548,549],{"class":187},"\"203.0.113.10\"",[171,551,286],{"class":176},[171,553,554,557,559,562],{"class":173,"line":384},[171,555,556],{"class":180},"  \"kind\"",[171,558,184],{"class":176},[171,560,561],{"class":187},"\"json\"",[171,563,286],{"class":176},[171,565,567,570,572,575],{"class":173,"line":566},13,[171,568,569],{"class":180},"  \"isText\"",[171,571,184],{"class":176},[171,573,574],{"class":180},"true",[171,576,286],{"class":176},[171,578,580,583,585,588,591,594,596,599,601,604,606,609],{"class":173,"line":579},14,[171,581,582],{"class":180},"  \"bodyText\"",[171,584,184],{"class":176},[171,586,587],{"class":187},"\"{",[171,589,590],{"class":180},"\\\"",[171,592,593],{"class":187},"event",[171,595,590],{"class":180},[171,597,598],{"class":187},":",[171,600,590],{"class":180},[171,602,603],{"class":187},"payment_intent.succeeded",[171,605,590],{"class":180},[171,607,608],{"class":187},"}\"",[171,610,286],{"class":176},[171,612,614,617,619,622],{"class":173,"line":613},15,[171,615,616],{"class":180},"  \"fields\"",[171,618,184],{"class":176},[171,620,621],{"class":180},"null",[171,623,286],{"class":176},[171,625,627,630,632,634],{"class":173,"line":626},16,[171,628,629],{"class":180},"  \"hasBody\"",[171,631,184],{"class":176},[171,633,574],{"class":180},[171,635,286],{"class":176},[171,637,639,642,644],{"class":173,"line":638},17,[171,640,641],{"class":180},"  \"createdAt\"",[171,643,184],{"class":176},[171,645,375],{"class":187},[171,647,649],{"class":173,"line":648},18,[171,650,651],{"class":176},"}\n",[28,653,654,655,658,659,662],{},"Beyond the raw body, the detail response ",[32,656,657],{},"categorizes"," the body and, for the\ntwo key\u002Fvalue shapes, ",[32,660,661],{},"parses"," it into fields:",[123,664,665,707],{},[126,666,667,670,671,191,673,676,677,680,681,684,685,688,689,191,692,191,695,191,698,191,700,232,703,706],{},[37,668,669],{},"kind"," — a coarse body category, chosen from the content-type and falling back\nto byte-sniffing when it's unknown. One of: ",[37,672,167],{},[37,674,675],{},"form","\n(",[37,678,679],{},"application\u002Fx-www-form-urlencoded","), ",[37,682,683],{},"multipart"," (",[37,686,687],{},"multipart\u002Fform-data","),\n",[37,690,691],{},"xml",[37,693,694],{},"graphql",[37,696,697],{},"sparql",[37,699,77],{},[37,701,702],{},"binary",[37,704,705],{},"none"," (empty\u002Fabsent body).",[126,708,709,712,713,408,715,717,718,720,721,723,724,727,728,731],{},[37,710,711],{},"fields"," — parsed key\u002Fvalue entries for ",[37,714,675],{},[37,716,683],{}," bodies only;\n",[37,719,621],{}," for every other ",[37,722,669],{},". Each entry is ",[37,725,726],{},"{ \"name\", \"value\" }"," for a plain\nfield, or ",[37,729,730],{},"{ \"name\", \"filename\", \"contentType\", \"size\" }"," for a file part (the\nbytes themselves are not embedded — use the raw endpoint). Values are decoded\nUTF-8, capped at 8 KB each.",[28,733,734,735,738,739,743],{},"These two fields are ",[32,736,737],{},"detail-only","; the ",[54,740,742],{"href":741},"#list-captured-requests","list endpoint","\nsummary is unchanged.",[67,745,747],{"id":746},"download-a-raw-body","Download a raw body",[72,749,752],{"className":750,"code":751,"language":77},[75],"GET \u002Fapi\u002Fbins\u002F:binId\u002Frequests\u002F:requestId\u002Fraw\n",[37,753,751],{"__ignoreMap":80},[28,755,756,757,760,761,763],{},"Returns the stored body bytes as ",[37,758,759],{},"application\u002Foctet-stream"," (forced, regardless\nof the captured content-type, so an attacker-controlled HTML\u002FJS body can't\nexecute). ",[37,762,235],{}," if the request has no body.",[67,765,767],{"id":766},"live-stream","Live stream",[72,769,772],{"className":770,"code":771,"language":77},[75],"GET \u002Fapi\u002Fbins\u002F:binId\u002Fstream\n",[37,773,771],{"__ignoreMap":80},[28,775,776,777,783,784,787,788,791,792,795,796,798],{},"A ",[54,778,782],{"href":779,"rel":780},"https:\u002F\u002Fdeveloper.mozilla.org\u002Fdocs\u002FWeb\u002FAPI\u002FServer-sent_events",[781],"nofollow","Server-Sent Events","\nstream of the bin's captured requests. Each new request is delivered as a default\n",[37,785,786],{},"message"," event whose ",[37,789,790],{},"data"," is the request summary (same shape as the list\nendpoint). A named ",[37,793,794],{},"ping"," event is sent periodically as a heartbeat and can be\nignored. Returns ",[37,797,235],{}," before the stream opens if the bin doesn't exist.",[72,800,804],{"className":801,"code":802,"language":803,"meta":80,"style":80},"language-js shiki shiki-themes github-light github-dark","const es = new EventSource(\"https:\u002F\u002Fhooks.pixelhop.io\u002Fapi\u002Fbins\u002Fabc123cuid\u002Fstream\");\nes.onmessage = (e) => console.log(\"captured:\", JSON.parse(e.data));\n","js",[37,805,806,834],{"__ignoreMap":80},[171,807,808,812,815,818,821,825,828,831],{"class":173,"line":13},[171,809,811],{"class":810},"szBVR","const",[171,813,814],{"class":180}," es",[171,816,817],{"class":810}," =",[171,819,820],{"class":810}," new",[171,822,824],{"class":823},"sScJk"," EventSource",[171,826,827],{"class":176},"(",[171,829,830],{"class":187},"\"https:\u002F\u002Fhooks.pixelhop.io\u002Fapi\u002Fbins\u002Fabc123cuid\u002Fstream\"",[171,832,833],{"class":176},");\n",[171,835,836,839,842,844,846,850,853,856,859,862,864,867,869,872,874,877],{"class":173,"line":9},[171,837,838],{"class":176},"es.",[171,840,841],{"class":823},"onmessage",[171,843,817],{"class":810},[171,845,684],{"class":176},[171,847,849],{"class":848},"s4XuR","e",[171,851,852],{"class":176},") ",[171,854,855],{"class":810},"=>",[171,857,858],{"class":176}," console.",[171,860,861],{"class":823},"log",[171,863,827],{"class":176},[171,865,866],{"class":187},"\"captured:\"",[171,868,191],{"class":176},[171,870,871],{"class":180},"JSON",[171,873,58],{"class":176},[171,875,876],{"class":823},"parse",[171,878,879],{"class":176},"(e.data));\n",[67,881,103],{"id":882},"configure-the-response",[28,884,885,886,888,889,892,893,896,897,900,901,904,905,907,908,910,911,914],{},"By default the capture endpoint returns ",[37,887,86],{},". A bin's ",[32,890,891],{},"owner"," can configure\na custom response so the endpoint can drive client logic that branches on it —\nretry on ",[37,894,895],{},"5xx",", follow a redirect, parse a JSON ack, or test timeout handling.\nThese three endpoints are ",[32,898,899],{},"owner-only",": they require the session cookie or an\n",[37,902,903],{},"x-api-key"," personal access token of the user who owns the bin (see\n",[54,906,57],{"href":56},"), and return ",[37,909,235],{}," for anyone\nelse so a bin's configuration never leaks. Reading and serving the configured\nresponse over ",[37,912,913],{},"\u002Fh\u002F:binId"," stays fully public.",[72,916,919],{"className":917,"code":918,"language":77},[75],"GET    \u002Fapi\u002Fbins\u002F:binId\u002Fresponse\nPUT    \u002Fapi\u002Fbins\u002F:binId\u002Fresponse\nDELETE \u002Fapi\u002Fbins\u002F:binId\u002Fresponse\n",[37,920,918],{"__ignoreMap":80},[28,922,923,926,927,930,931,934,935,938,939,58],{},[37,924,925],{},"GET"," returns ",[37,928,929],{},"{ \"configured\": boolean, \"config\": { ... } }",". ",[37,932,933],{},"PUT"," upserts the\nconfig (full replacement). ",[37,936,937],{},"DELETE"," clears it, reverting the endpoint to\n",[37,940,86],{},[72,942,944],{"className":165,"code":943,"language":167,"meta":80,"style":80},"PUT \u002Fapi\u002Fbins\u002Fabc123cuid\u002Fresponse\n{\n  \"status\": 503,\n  \"contentType\": \"application\u002Fjson\",\n  \"body\": \"{\\\"error\\\":\\\"try again\\\"}\",\n  \"headers\": { \"Retry-After\": \"5\" },\n  \"delayMs\": 250\n}\n",[37,945,946,957,961,973,983,1012,1028,1038],{"__ignoreMap":80},[171,947,948,951,954],{"class":173,"line":13},[171,949,950],{"class":176},"PUT \u002Fapi\u002Fbins\u002Fabc",[171,952,953],{"class":180},"123",[171,955,956],{"class":176},"cuid\u002Fresponse\n",[171,958,959],{"class":173,"line":9},[171,960,422],{"class":176},[171,962,963,966,968,971],{"class":173,"line":275},[171,964,965],{"class":180},"  \"status\"",[171,967,184],{"class":176},[171,969,970],{"class":180},"503",[171,972,286],{"class":176},[171,974,975,977,979,981],{"class":173,"line":289},[171,976,511],{"class":180},[171,978,184],{"class":176},[171,980,336],{"class":187},[171,982,286],{"class":176},[171,984,985,988,990,992,994,997,999,1001,1003,1006,1008,1010],{"class":173,"line":302},[171,986,987],{"class":180},"  \"body\"",[171,989,184],{"class":176},[171,991,587],{"class":187},[171,993,590],{"class":180},[171,995,996],{"class":187},"error",[171,998,590],{"class":180},[171,1000,598],{"class":187},[171,1002,590],{"class":180},[171,1004,1005],{"class":187},"try again",[171,1007,590],{"class":180},[171,1009,608],{"class":187},[171,1011,286],{"class":176},[171,1013,1014,1016,1018,1021,1023,1026],{"class":173,"line":315},[171,1015,483],{"class":180},[171,1017,486],{"class":176},[171,1019,1020],{"class":180},"\"Retry-After\"",[171,1022,184],{"class":176},[171,1024,1025],{"class":187},"\"5\"",[171,1027,506],{"class":176},[171,1029,1030,1033,1035],{"class":173,"line":328},[171,1031,1032],{"class":180},"  \"delayMs\"",[171,1034,184],{"class":176},[171,1036,1037],{"class":180},"250\n",[171,1039,1040],{"class":173,"line":341},[171,1041,651],{"class":176},[28,1043,1044],{},[32,1045,1046],{},"Fields",[123,1048,1049,1074,1104,1113,1170],{},[126,1050,1051,1054,1055,1058,1059,1062,1063,191,1066,1069,1070,1073],{},[37,1052,1053],{},"status"," — integer ",[37,1056,1057],{},"200","–",[37,1060,1061],{},"599",". For ",[37,1064,1065],{},"204",[37,1067,1068],{},"205",", and ",[37,1071,1072],{},"304"," the body and\ncontent-type are dropped (those statuses forbid a body).",[126,1075,1076,1079,1080,930,1083,1096,1097,1100,1101,58],{},[37,1077,1078],{},"contentType"," — defaults to ",[37,1081,1082],{},"text\u002Fplain; charset=utf-8",[32,1084,1085,1086,191,1089,191,1092,1095],{},"HTML-ish types\n(",[37,1087,1088],{},"text\u002Fhtml",[37,1090,1091],{},"image\u002Fsvg+xml",[37,1093,1094],{},"application\u002Fxhtml+xml",") are rejected",", not\ndowngraded — the capture endpoint shares an origin with the app, so a rendered\nHTML body would be script execution against that origin. Every configured\nresponse is also sent with ",[37,1098,1099],{},"X-Content-Type-Options: nosniff"," and\n",[37,1102,1103],{},"Content-Security-Policy: sandbox",[126,1105,1106,1109,1110,58],{},[37,1107,1108],{},"body"," — a UTF-8 string, up to ",[32,1111,1112],{},"64 KB",[126,1114,1115,1118,1119,286,1122,191,1125,191,1128,191,1131,191,1134,286,1137,191,1140,191,1143,191,1146,191,1149,191,1152,1155,1156,1159,1160,1162,1163,1166,1167,1169],{},[37,1116,1117],{},"headers"," — an allowlist of representational\u002Fcaching headers (",[37,1120,1121],{},"Cache-Control",[37,1123,1124],{},"Content-Disposition",[37,1126,1127],{},"Content-Language",[37,1129,1130],{},"ETag",[37,1132,1133],{},"Expires",[37,1135,1136],{},"Last-Modified",[37,1138,1139],{},"Vary",[37,1141,1142],{},"Retry-After",[37,1144,1145],{},"Link",[37,1147,1148],{},"WWW-Authenticate",[37,1150,1151],{},"Age",[37,1153,1154],{},"Location",") plus any\ncustom ",[37,1157,1158],{},"X-*"," header. ",[37,1161,1154],{}," must be an absolute ",[37,1164,1165],{},"http(s)"," URL or a ",[37,1168,98],{}," path.\nCookies, CORS, security\u002FCSP\u002Fframing, hop-by-hop, and runtime-managed headers\nare rejected. Up to 20 headers.",[126,1171,1172,1175,1176,1058,1179,1182],{},[37,1173,1174],{},"delayMs"," — artificial delay before responding, ",[37,1177,1178],{},"0",[32,1180,1181],{},"10000"," (10s).",[28,1184,1185,1186,1189],{},"Invalid config is rejected with ",[37,1187,1188],{},"400"," and a message explaining why.",[108,1191,1192],{"type":110},[28,1193,1194,1195,1198],{},"You can also set this from the bin's page in the app (the ",[32,1196,1197],{},"Configure response","\npanel, visible only to the owner).",[67,1200,57],{"id":1201},"authenticated-endpoints",[28,1203,1204,1205,1209],{},"Creating, capturing, and reading bins needs no account. But if you\n",[54,1206,1208],{"href":1207},"\u002Fsign-in","sign in",", the bins you create are saved to your account, and a small\nset of endpoints lets you manage that list. These are the only authenticated\nendpoints — everything above is anonymous.",[28,1211,1212,1215,1216,1220,1221,1224,1225,1228,1229,1231,1232,598],{},[32,1213,1214],{},"Authentication."," Authenticate with ",[1217,1218,1219],"em",{},"either"," the better-auth ",[32,1222,1223],{},"session cookie","\n(set automatically in the browser after sign-in) ",[1217,1226,1227],{},"or"," an ",[37,1230,903],{}," header\ncarrying a ",[32,1233,1234],{},"personal access token",[72,1236,1239],{"className":1237,"code":1238,"language":77},[75],"x-api-key: ph_xxxxxxxx…\n",[37,1240,1238],{"__ignoreMap":80},[28,1242,1243,1244,1247,1248,1251,1252,1254,1255,1258],{},"Because the app, the API, and the capture endpoint share one origin, there are no\ncross-origin cookies and no CORS; the session cookie is ",[37,1245,1246],{},"SameSite=Lax",". A request\nwith no valid credential gets ",[37,1249,1250],{},"401",". A bin that exists but isn't yours returns\n",[37,1253,235],{},", never ",[37,1256,1257],{},"403"," — ownership never leaks.",[28,1260,1261,1264,1265,1268,1269,1272,1273,98,1275,1100,1278,1281,1282,1285],{},[32,1262,1263],{},"Personal access tokens."," Mint a PAT from the app once signed in. The raw\n",[37,1266,1267],{},"ph_…"," token is shown ",[32,1270,1271],{},"exactly once"," at creation and is never retrievable again;\nit carries a ~1-year expiry. PATs are managed through ",[37,1274,925],{},[37,1276,1277],{},"POST \u002Fapi\u002Fpat",[37,1279,1280],{},"DELETE \u002Fapi\u002Fpat\u002F:id",", which are ",[32,1283,1284],{},"browser-session-only"," (you can't mint a PAT\nwith a PAT), so they're driven from the app rather than scripted.",[1287,1288,1290],"h3",{"id":1289},"list-your-bins","List your bins",[72,1292,1295],{"className":1293,"code":1294,"language":77},[75],"GET \u002Fapi\u002Fbins?limit=&cursor=\n",[37,1296,1294],{"__ignoreMap":80},[28,1298,1299,1300,1302],{},"Returns the bins you own, ",[32,1301,252],{},", metadata only (no per-bin request\ncounts). Keyset (cursor) paginated. Two optional query params:",[123,1304,1305,1323],{},[126,1306,1307,1310,1311,1058,1314,1317,1318,1320,1321,58],{},[37,1308,1309],{},"limit"," — page size, an integer ",[37,1312,1313],{},"1",[37,1315,1316],{},"500"," (default ",[37,1319,1316],{},"). Out of range → ",[37,1322,1188],{},[126,1324,1325,1328,1329,1332,1333,58],{},[37,1326,1327],{},"cursor"," — an opaque pagination cursor; pass back the ",[37,1330,1331],{},"nextCursor"," from a\nprevious response to fetch the next page. Treat it as opaque (don't construct\nor parse it). Malformed → ",[37,1334,1188],{},[28,1336,1337,1340,1341,1343,1344,1346,1347,1352],{},[37,1338,1339],{},"hasMore"," is ",[37,1342,574],{}," when more bins exist beyond this page; when it is, the\nresponse also includes ",[37,1345,1331],{},". This backs the MCP\n",[54,1348,1349],{"href":11},[37,1350,1351],{},"list_my_bins"," tool.",[72,1354,1356],{"className":165,"code":1355,"language":167,"meta":80,"style":80},"{\n  \"bins\": [\n    {\n      \"binId\": \"abc123cuid\",\n      \"label\": \"Stripe staging\",\n      \"createdAt\": 1750323600000\n    }\n  ],\n  \"hasMore\": true,\n  \"nextCursor\": \"MTc1MDMyMzYwMDAwMDphYmMxMjNjdWlk\"\n}\n",[37,1357,1358,1362,1370,1375,1386,1398,1408,1413,1418,1429,1439],{"__ignoreMap":80},[171,1359,1360],{"class":173,"line":13},[171,1361,422],{"class":176},[171,1363,1364,1367],{"class":173,"line":9},[171,1365,1366],{"class":180},"  \"bins\"",[171,1368,1369],{"class":176},": [\n",[171,1371,1372],{"class":173,"line":275},[171,1373,1374],{"class":176},"    {\n",[171,1376,1377,1380,1382,1384],{"class":173,"line":289},[171,1378,1379],{"class":180},"      \"binId\"",[171,1381,184],{"class":176},[171,1383,188],{"class":187},[171,1385,286],{"class":176},[171,1387,1388,1391,1393,1396],{"class":173,"line":302},[171,1389,1390],{"class":180},"      \"label\"",[171,1392,184],{"class":176},[171,1394,1395],{"class":187},"\"Stripe staging\"",[171,1397,286],{"class":176},[171,1399,1400,1403,1405],{"class":173,"line":315},[171,1401,1402],{"class":180},"      \"createdAt\"",[171,1404,184],{"class":176},[171,1406,1407],{"class":180},"1750323600000\n",[171,1409,1410],{"class":173,"line":328},[171,1411,1412],{"class":176},"    }\n",[171,1414,1415],{"class":173,"line":341},[171,1416,1417],{"class":176},"  ],\n",[171,1419,1420,1423,1425,1427],{"class":173,"line":354},[171,1421,1422],{"class":180},"  \"hasMore\"",[171,1424,184],{"class":176},[171,1426,574],{"class":180},[171,1428,286],{"class":176},[171,1430,1431,1434,1436],{"class":173,"line":367},[171,1432,1433],{"class":180},"  \"nextCursor\"",[171,1435,184],{"class":176},[171,1437,1438],{"class":187},"\"MTc1MDMyMzYwMDAwMDphYmMxMjNjdWlk\"\n",[171,1440,1441],{"class":173,"line":378},[171,1442,651],{"class":176},[1287,1444,1446],{"id":1445},"label-a-bin","Label a bin",[72,1448,1451],{"className":1449,"code":1450,"language":77},[75],"PATCH \u002Fapi\u002Fbins\u002F:binId\n",[37,1452,1450],{"__ignoreMap":80},[28,1454,1455,1456,1459,1460,1462,1463,1466,1467,1470,1471,1473,1474,1352],{},"Sets or clears a bin's label. Body is ",[37,1457,1458],{},"{ \"label\": \"…\" }","; an empty string, ",[37,1461,621],{},",\nor an omitted ",[37,1464,1465],{},"label"," clears it. Max 255 characters. Returns ",[37,1468,1469],{},"{ \"ok\": true }",", or\n",[37,1472,235],{}," if the bin isn't yours. Backs the MCP\n",[54,1475,1476],{"href":11},[37,1477,1478],{},"rename_bin",[72,1480,1484],{"className":1481,"code":1482,"language":1483,"meta":80,"style":80},"language-bash shiki shiki-themes github-light github-dark","curl -X PATCH https:\u002F\u002Fhooks.pixelhop.io\u002Fapi\u002Fbins\u002Fabc123cuid \\\n  -H 'x-api-key: ph_xxxxxxxx' \\\n  -H 'content-type: application\u002Fjson' \\\n  -d '{\"label\":\"Stripe staging\"}'\n# { \"ok\": true }\n","bash",[37,1485,1486,1503,1513,1522,1530],{"__ignoreMap":80},[171,1487,1488,1491,1494,1497,1500],{"class":173,"line":13},[171,1489,1490],{"class":823},"curl",[171,1492,1493],{"class":180}," -X",[171,1495,1496],{"class":187}," PATCH",[171,1498,1499],{"class":187}," https:\u002F\u002Fhooks.pixelhop.io\u002Fapi\u002Fbins\u002Fabc123cuid",[171,1501,1502],{"class":180}," \\\n",[171,1504,1505,1508,1511],{"class":173,"line":9},[171,1506,1507],{"class":180},"  -H",[171,1509,1510],{"class":187}," 'x-api-key: ph_xxxxxxxx'",[171,1512,1502],{"class":180},[171,1514,1515,1517,1520],{"class":173,"line":275},[171,1516,1507],{"class":180},[171,1518,1519],{"class":187}," 'content-type: application\u002Fjson'",[171,1521,1502],{"class":180},[171,1523,1524,1527],{"class":173,"line":289},[171,1525,1526],{"class":180},"  -d",[171,1528,1529],{"class":187}," '{\"label\":\"Stripe staging\"}'\n",[171,1531,1532],{"class":173,"line":302},[171,1533,1535],{"class":1534},"sJ8bj","# { \"ok\": true }\n",[1287,1537,1539],{"id":1538},"remove-a-bin","Remove a bin",[72,1541,1544],{"className":1542,"code":1543,"language":77},[75],"DELETE \u002Fapi\u002Fbins\u002F:binId\n",[37,1545,1543],{"__ignoreMap":80},[28,1547,1548,1549,1552,1553,1556,1557,232,1559,1561,1562,1352],{},"Removes the bin from your list. This is an ",[32,1550,1551],{},"unlink, not a destructive delete"," —\nthe bin and its captured requests stay readable by id; only the ownership link is\ndropped. Because the bin is now unowned, it reverts to the ",[32,1554,1555],{},"30-day anonymous idle\nexpiry"," (an owned bin never auto-expires), so an unlinked bin left unused is\neventually purged. Returns ",[37,1558,1469],{},[37,1560,235],{}," if the bin isn't yours.\nBacks the MCP ",[54,1563,1564],{"href":11},[37,1565,1566],{},"delete_bin",[67,1568,1570],{"id":1569},"whats-next","What's next",[123,1572,1573,1578],{},[126,1574,1575,1577],{},[54,1576,16],{"href":15}," — the create → send → read loop.",[126,1579,1580,1582],{},[54,1581,12],{"href":11}," — drive all of the above from an AI agent.",[1584,1585,1586],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}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 .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":80,"searchDepth":9,"depth":9,"links":1588},[1589,1590,1591,1592,1593,1594,1595,1596,1597,1602],{"id":69,"depth":9,"text":70},{"id":155,"depth":9,"text":156},{"id":218,"depth":9,"text":219},{"id":239,"depth":9,"text":240},{"id":390,"depth":9,"text":391},{"id":746,"depth":9,"text":747},{"id":766,"depth":9,"text":767},{"id":882,"depth":9,"text":103},{"id":1201,"depth":9,"text":57,"children":1598},[1599,1600,1601],{"id":1289,"depth":275,"text":1290},{"id":1445,"depth":275,"text":1446},{"id":1538,"depth":275,"text":1539},{"id":1569,"depth":9,"text":1570},"Every Pixelhooks endpoint — capture, bins, requests, and the live stream.","md",{},true,{"title":20,"description":1603},"docs\u002Fdevelopers\u002Frest-api","daqK8piKzvWCEtI8k1SJFM6KRvI-BTohaF63GnB4qi4",1784741510937]