[{"data":1,"prerenderedAt":755},["ShallowReactive",2],{"navigation":3,"/docs/getting-started/installation":50,"/docs/getting-started/installation-surround":750},[4,23],{"title":5,"path":6,"stem":7,"children":8,"icon":22},"Getting Started","/docs/getting-started","1.docs/1.getting-started/1.index",[9,12,17],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-lucide-house",{"title":13,"path":14,"stem":15,"icon":16},"Installation","/docs/getting-started/installation","1.docs/1.getting-started/2.installation","i-lucide-download",{"title":18,"path":19,"stem":20,"icon":21},"Usage Guide","/docs/getting-started/usage","1.docs/1.getting-started/3.usage","i-lucide-sliders",false,{"title":24,"path":25,"stem":26,"children":27,"icon":29},"API Overview","/docs/api","1.docs/2.api/1.index",[28,30,35,40,45],{"title":24,"path":25,"stem":26,"icon":29},"i-lucide-server-cog",{"title":31,"path":32,"stem":33,"icon":34},"Agents","/docs/api/agents","1.docs/2.api/2.agents","i-lucide-bot",{"title":36,"path":37,"stem":38,"icon":39},"Messages","/docs/api/messages","1.docs/2.api/3.messages","i-lucide-mail",{"title":41,"path":42,"stem":43,"icon":44},"Threads","/docs/api/threads","1.docs/2.api/4.threads","i-lucide-git-branch",{"title":46,"path":47,"stem":48,"icon":49},"Webhooks","/docs/api/webhooks","1.docs/2.api/5.webhooks","i-lucide-webhook",{"id":51,"title":13,"body":52,"description":744,"extension":745,"meta":746,"navigation":747,"path":14,"seo":748,"stem":15,"__hash__":749},"docs/1.docs/1.getting-started/2.installation.md",{"type":53,"value":54,"toc":732},"minimark",[55,64,69,99,103,146,150,161,188,191,216,220,259,269,303,313,317,331,342,346,349,386,397,401,404,516,519,563,567,588,610,614,711,715,728],[56,57,58,59,63],"p",{},"Sendook is one Cloudflare Worker plus a D1 database, a Durable Object class, and an Email Routing rule. End-to-end deployment is a ",[60,61,62],"code",{},"wrangler deploy"," and three Cloudflare console clicks.",[65,66,68],"h2",{"id":67},"prerequisites","Prerequisites",[70,71,72,76,79,93],"ul",{},[73,74,75],"li",{},"A Cloudflare account with Workers + Email Routing access.",[73,77,78],{},"A domain whose MX records you can point at Cloudflare Email Routing.",[73,80,81,84,85,88,89,92],{},[60,82,83],{},"bun"," (preferred) or ",[60,86,87],{},"pnpm",". Do not use ",[60,90,91],{},"npm",".",[73,94,95,98],{},[60,96,97],{},"wrangler@4"," (the repo pins it as a devDependency).",[65,100,102],{"id":101},"_1-clone-and-install","1. Clone and install",[104,105,110],"pre",{"className":106,"code":107,"language":108,"meta":109,"style":109},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","git clone https://github.com/StreamlinedStartup/sendook\ncd sendook/worker\nbun install\n","bash","",[60,111,112,128,138],{"__ignoreMap":109},[113,114,117,121,125],"span",{"class":115,"line":116},"line",1,[113,118,120],{"class":119},"sBMFI","git",[113,122,124],{"class":123},"sfazB"," clone",[113,126,127],{"class":123}," https://github.com/StreamlinedStartup/sendook\n",[113,129,131,135],{"class":115,"line":130},2,[113,132,134],{"class":133},"s2Zo4","cd",[113,136,137],{"class":123}," sendook/worker\n",[113,139,141,143],{"class":115,"line":140},3,[113,142,83],{"class":119},[113,144,145],{"class":123}," install\n",[65,147,149],{"id":148},"_2-provision-the-cloudflare-resources","2. Provision the Cloudflare resources",[56,151,152,153,156,157,160],{},"Create the prod D1 database, then add its ",[60,154,155],{},"database_id"," to ",[60,158,159],{},"worker/wrangler.jsonc",":",[104,162,164],{"className":106,"code":163,"language":108,"meta":109,"style":109},"bun wrangler d1 create sendook\n# copy the printed database_id into the d1_databases[0].database_id field\n",[60,165,166,182],{"__ignoreMap":109},[113,167,168,170,173,176,179],{"class":115,"line":116},[113,169,83],{"class":119},[113,171,172],{"class":123}," wrangler",[113,174,175],{"class":123}," d1",[113,177,178],{"class":123}," create",[113,180,181],{"class":123}," sendook\n",[113,183,184],{"class":115,"line":130},[113,185,187],{"class":186},"sHwdD","# copy the printed database_id into the d1_databases[0].database_id field\n",[56,189,190],{},"Apply the migrations:",[104,192,194],{"className":106,"code":193,"language":108,"meta":109,"style":109},"bun wrangler d1 migrations apply sendook --remote\n",[60,195,196],{"__ignoreMap":109},[113,197,198,200,202,204,207,210,213],{"class":115,"line":116},[113,199,83],{"class":119},[113,201,172],{"class":123},[113,203,175],{"class":123},[113,205,206],{"class":123}," migrations",[113,208,209],{"class":123}," apply",[113,211,212],{"class":123}," sendook",[113,214,215],{"class":123}," --remote\n",[65,217,219],{"id":218},"_3-set-secrets-and-vars","3. Set secrets and vars",[104,221,223],{"className":106,"code":222,"language":108,"meta":109,"style":109},"bun wrangler secret put MASTER_KEY            # e.g. openssl rand -base64 32\nbun wrangler secret put API_KEY_HASH_PEPPER   # e.g. openssl rand -base64 32\n",[60,224,225,243],{"__ignoreMap":109},[113,226,227,229,231,234,237,240],{"class":115,"line":116},[113,228,83],{"class":119},[113,230,172],{"class":123},[113,232,233],{"class":123}," secret",[113,235,236],{"class":123}," put",[113,238,239],{"class":123}," MASTER_KEY",[113,241,242],{"class":186},"            # e.g. openssl rand -base64 32\n",[113,244,245,247,249,251,253,256],{"class":115,"line":130},[113,246,83],{"class":119},[113,248,172],{"class":123},[113,250,233],{"class":123},[113,252,236],{"class":123},[113,254,255],{"class":123}," API_KEY_HASH_PEPPER",[113,257,258],{"class":186},"   # e.g. openssl rand -base64 32\n",[56,260,261,262,265,266,268],{},"Update the ",[60,263,264],{},"vars"," block in ",[60,267,159],{}," to point at your real domain:",[104,270,274],{"className":271,"code":272,"language":273,"meta":109,"style":109},"language-jsonc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\"vars\": {\n  \"VERSION\": \"1.0.0\",\n  \"DEFAULT_EMAIL_DOMAIN\": \"agents.yourdomain.com\",\n  \"ALLOWED_ORIGINS\": \"https://app.yourdomain.com\"\n}\n","jsonc",[60,275,276,281,286,291,297],{"__ignoreMap":109},[113,277,278],{"class":115,"line":116},[113,279,280],{},"\"vars\": {\n",[113,282,283],{"class":115,"line":130},[113,284,285],{},"  \"VERSION\": \"1.0.0\",\n",[113,287,288],{"class":115,"line":140},[113,289,290],{},"  \"DEFAULT_EMAIL_DOMAIN\": \"agents.yourdomain.com\",\n",[113,292,294],{"class":115,"line":293},4,[113,295,296],{},"  \"ALLOWED_ORIGINS\": \"https://app.yourdomain.com\"\n",[113,298,300],{"class":115,"line":299},5,[113,301,302],{},"}\n",[56,304,305,308,309,312],{},[60,306,307],{},"DEFAULT_EMAIL_DOMAIN"," is the suffix attached to every new agent's address. ",[60,310,311],{},"ALLOWED_ORIGINS"," is the comma-separated list of browser origins permitted to call the API; set to your dashboard's origin.",[65,314,316],{"id":315},"_4-deploy-the-worker","4. Deploy the Worker",[104,318,320],{"className":106,"code":319,"language":108,"meta":109,"style":109},"bun wrangler deploy\n",[60,321,322],{"__ignoreMap":109},[113,323,324,326,328],{"class":115,"line":116},[113,325,83],{"class":119},[113,327,172],{"class":123},[113,329,330],{"class":123}," deploy\n",[56,332,333,334,337,338,341],{},"The Worker will be available at the route configured in ",[60,335,336],{},"wrangler.jsonc"," (or the ",[60,339,340],{},"*.workers.dev"," URL printed at deploy time).",[65,343,345],{"id":344},"_5-wire-email-routing","5. Wire Email Routing",[56,347,348],{},"In the Cloudflare dashboard for your domain:",[350,351,352,363,379],"ol",{},[73,353,354,358,359,362],{},[355,356,357],"strong",{},"Email"," → ",[355,360,361],{},"Email Routing"," → enable Email Routing (Cloudflare prompts to add MX records).",[73,364,365,358,368,371,372,375,376,92],{},[355,366,367],{},"Routing Rules",[355,369,370],{},"Catch-all address"," → set Action to ",[355,373,374],{},"Send to a Worker"," → pick the deployed ",[60,377,378],{},"sendook-worker",[73,380,381,382,385],{},"Verify any sender addresses you plan to use as ",[60,383,384],{},"From"," for outbound mail (Send Email binding requires this for new domains).",[56,387,388,389,392,393,396],{},"Once MX propagates, mail to ",[60,390,391],{},"*.yourdomain.com"," will hit the Worker's ",[60,394,395],{},"email()"," handler, which routes by recipient to the matching agent.",[65,398,400],{"id":399},"_6-smoke-test","6. Smoke test",[56,402,403],{},"Create your first agent and send mail to yourself:",[104,405,407],{"className":106,"code":406,"language":108,"meta":109,"style":109},"export SENDOOK_HOST=https://api.yourdomain.com\nexport SENDOOK_MASTER_KEY=...\n\ncurl -sX POST \"$SENDOOK_HOST/agents\" \\\n  -H \"Authorization: Bearer $SENDOOK_MASTER_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"Smoke\"}'\n",[60,408,409,426,438,444,470,487,501],{"__ignoreMap":109},[113,410,411,415,419,423],{"class":115,"line":116},[113,412,414],{"class":413},"spNyl","export",[113,416,418],{"class":417},"sTEyZ"," SENDOOK_HOST",[113,420,422],{"class":421},"sMK4o","=",[113,424,425],{"class":417},"https://api.yourdomain.com\n",[113,427,428,430,433,435],{"class":115,"line":130},[113,429,414],{"class":413},[113,431,432],{"class":417}," SENDOOK_MASTER_KEY",[113,434,422],{"class":421},[113,436,437],{"class":417},"...\n",[113,439,440],{"class":115,"line":140},[113,441,443],{"emptyLinePlaceholder":442},true,"\n",[113,445,446,449,452,455,458,461,464,467],{"class":115,"line":293},[113,447,448],{"class":119},"curl",[113,450,451],{"class":123}," -sX",[113,453,454],{"class":123}," POST",[113,456,457],{"class":421}," \"",[113,459,460],{"class":417},"$SENDOOK_HOST",[113,462,463],{"class":123},"/agents",[113,465,466],{"class":421},"\"",[113,468,469],{"class":417}," \\\n",[113,471,472,475,477,480,483,485],{"class":115,"line":299},[113,473,474],{"class":123},"  -H",[113,476,457],{"class":421},[113,478,479],{"class":123},"Authorization: Bearer ",[113,481,482],{"class":417},"$SENDOOK_MASTER_KEY",[113,484,466],{"class":421},[113,486,469],{"class":417},[113,488,490,492,494,497,499],{"class":115,"line":489},6,[113,491,474],{"class":123},[113,493,457],{"class":421},[113,495,496],{"class":123},"Content-Type: application/json",[113,498,466],{"class":421},[113,500,469],{"class":417},[113,502,504,507,510,513],{"class":115,"line":503},7,[113,505,506],{"class":123},"  -d",[113,508,509],{"class":421}," '",[113,511,512],{"class":123},"{\"name\":\"Smoke\"}",[113,514,515],{"class":421},"'\n",[56,517,518],{},"Then send a real email from another address to the agent's address and verify it lands:",[104,520,522],{"className":106,"code":521,"language":108,"meta":109,"style":109},"curl -s \"$SENDOOK_HOST/agents/\u003Cagent_id>/messages\" \\\n  -H \"Authorization: Bearer $SENDOOK_MASTER_KEY\" | jq .\n",[60,523,524,542],{"__ignoreMap":109},[113,525,526,528,531,533,535,538,540],{"class":115,"line":116},[113,527,448],{"class":119},[113,529,530],{"class":123}," -s",[113,532,457],{"class":421},[113,534,460],{"class":417},[113,536,537],{"class":123},"/agents/\u003Cagent_id>/messages",[113,539,466],{"class":421},[113,541,469],{"class":417},[113,543,544,546,548,550,552,554,557,560],{"class":115,"line":130},[113,545,474],{"class":123},[113,547,457],{"class":421},[113,549,479],{"class":123},[113,551,482],{"class":417},[113,553,466],{"class":421},[113,555,556],{"class":421}," |",[113,558,559],{"class":119}," jq",[113,561,562],{"class":123}," .\n",[65,564,566],{"id":565},"local-development","Local development",[56,568,569,572,573,576,577,580,581,584,585,92],{},[60,570,571],{},"wrangler dev"," runs the Worker on ",[60,574,575],{},"http://localhost:8787"," with miniflare-backed D1 and DO storage. Pair it with the Nuxt dashboard at ",[60,578,579],{},"app/"," (",[60,582,583],{},"bun run dev"," in that directory) and it will talk to the local Worker via ",[60,586,587],{},"useApi",[104,589,591],{"className":106,"code":590,"language":108,"meta":109,"style":109},"cd worker\nbun run dev\n",[60,592,593,600],{"__ignoreMap":109},[113,594,595,597],{"class":115,"line":116},[113,596,134],{"class":133},[113,598,599],{"class":123}," worker\n",[113,601,602,604,607],{"class":115,"line":130},[113,603,83],{"class":119},[113,605,606],{"class":123}," run",[113,608,609],{"class":123}," dev\n",[65,611,613],{"id":612},"environment-variables-reference","Environment variables reference",[615,616,617,633],"table",{},[618,619,620],"thead",{},[621,622,623,627,630],"tr",{},[624,625,626],"th",{},"Variable",[624,628,629],{},"Type",[624,631,632],{},"Description",[634,635,636,660,672,684,695],"tbody",{},[621,637,638,644,647],{},[639,640,641],"td",{},[60,642,643],{},"MASTER_KEY",[639,645,646],{},"secret",[639,648,649,650,653,654,653,657,92],{},"Bearer token for ",[60,651,652],{},"POST /agents",", ",[60,655,656],{},"GET /agents",[60,658,659],{},"DELETE /agents/:id",[621,661,662,667,669],{},[639,663,664],{},[60,665,666],{},"API_KEY_HASH_PEPPER",[639,668,646],{},[639,670,671],{},"HMAC pepper for hashing per-agent API keys before storing.",[621,673,674,678,681],{},[639,675,676],{},[60,677,307],{},[639,679,680],{},"var",[639,682,683],{},"Suffix appended to each new agent's address.",[621,685,686,690,692],{},[639,687,688],{},[60,689,311],{},[639,691,680],{},[639,693,694],{},"Comma-separated browser origins allowed by CORS.",[621,696,697,702,704],{},[639,698,699],{},[60,700,701],{},"VERSION",[639,703,680],{},[639,705,706,707,710],{},"Surfaced via ",[60,708,709],{},"GET /health"," for build-tracking.",[65,712,714],{"id":713},"next-steps","Next steps",[70,716,717,723],{},[73,718,719,722],{},[720,721,18],"a",{"href":19}," — agent CRUD, send, receive, threads, webhooks.",[73,724,725,727],{},[720,726,24],{"href":25}," — every route in detail.",[729,730,731],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}",{"title":109,"searchDepth":130,"depth":130,"links":733},[734,735,736,737,738,739,740,741,742,743],{"id":67,"depth":130,"text":68},{"id":101,"depth":130,"text":102},{"id":148,"depth":130,"text":149},{"id":218,"depth":130,"text":219},{"id":315,"depth":130,"text":316},{"id":344,"depth":130,"text":345},{"id":399,"depth":130,"text":400},{"id":565,"depth":130,"text":566},{"id":612,"depth":130,"text":613},{"id":713,"depth":130,"text":714},"Deploy the Sendook Worker on your Cloudflare account.","md",{},{"icon":16},{"title":13,"description":744},"Fekn4eSupm5xTE7_P__Y0AwdD2WiszELfAEFxsXgMbw",[751,753],{"title":10,"path":6,"stem":7,"description":752,"icon":11,"children":-1},"Welcome to Sendook — email infrastructure for AI agents on Cloudflare.",{"title":18,"path":19,"stem":20,"description":754,"icon":21,"children":-1},"The everyday workflows for sending, receiving, threading, and webhook delivery.",1778700750587]