[{"data":1,"prerenderedAt":596},["ShallowReactive",2],{"navigation":3,"/docs/getting-started":50,"/docs/getting-started-surround":592},[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":10,"body":52,"description":586,"extension":587,"meta":588,"navigation":589,"path":6,"seo":590,"stem":7,"__hash__":591},"docs/1.docs/1.getting-started/1.index.md",{"type":53,"value":54,"toc":580},"minimark",[55,64,69,72,101,104,130,137,141,211,215,218,247,250,338,341,457,463,545,554,558,576],[56,57,58,59,63],"p",{},"Sendook turns one Cloudflare account into a fleet of self-contained email agents. Each agent has its own address, its own mailbox, and its own webhook subscriptions, all backed by a single Worker + Durable Object + D1 stack. There is no signup, no SDK install, no daemon to keep running — just a master API key and ",[60,61,62],"code",{},"curl",".",[65,66,68],"h2",{"id":67},"why-sendook","Why Sendook",[56,70,71],{},"Traditional email infrastructure for agents is heavy:",[73,74,75,83,89,95],"ul",{},[76,77,78,82],"li",{},[79,80,81],"strong",{},"Long DNS / deliverability setup"," — SPF, DKIM, DMARC, MX, verification rounds.",[76,84,85,88],{},[79,86,87],{},"OAuth flows or SES credential management"," — each provider with its own quirks.",[76,90,91,94],{},[79,92,93],{},"Manual MIME parsing"," — quoted-printable, multipart, attachments, threading.",[76,96,97,100],{},[79,98,99],{},"Polling for new mail"," — or running an SMTP listener you have to keep alive.",[56,102,103],{},"Sendook offloads everything to Cloudflare:",[73,105,106,112,118,124],{},[76,107,108,111],{},[79,109,110],{},"Email Routing"," receives mail and pipes it into a Worker.",[76,113,114,117],{},[79,115,116],{},"Send Email binding"," sends mail back out.",[76,119,120,123],{},[79,121,122],{},"Durable Objects"," hold per-agent state in per-agent SQLite.",[76,125,126,129],{},[79,127,128],{},"D1"," holds the agents directory and webhook configurations.",[56,131,132,133,136],{},"You operate it with a ",[60,134,135],{},"MASTER_KEY"," secret. Each agent gets a per-agent API key that scopes access to that agent's own mailbox.",[65,138,140],{"id":139},"key-features","Key features",[73,142,143,164,170,183,193,202],{},[76,144,145,148,149,152,153,156,157,160,161,63],{},[79,146,147],{},"Agents in one POST"," — ",[60,150,151],{},"POST /agents"," returns an ",[60,154,155],{},"id",", an ",[60,158,159],{},"email",", and a per-agent ",[60,162,163],{},"api_key",[76,165,166,169],{},[79,167,168],{},"Per-agent mailbox"," — every agent's messages, threads, and webhook attempts live in its own DO storage.",[76,171,172,148,175,178,179,182],{},[79,173,174],{},"Inbound threading",[60,176,177],{},"In-Reply-To"," and ",[60,180,181],{},"References"," headers automatically join replies to the parent thread.",[76,184,185,188,189,192],{},[79,186,187],{},"HMAC-signed webhooks"," — every fanout request carries ",[60,190,191],{},"x-sendook-signature: sha256=\u003Chex>"," so you can authenticate the call.",[76,194,195,198,199,63],{},[79,196,197],{},"Bounded retries"," — webhook delivery retries 5 times with exponential backoff; per-attempt logs queryable via ",[60,200,201],{},"/agents/:id/webhooks/:webhookId/attempts",[76,203,204,148,207,210],{},[79,205,206],{},"Soft-delete agents",[60,208,209],{},"DELETE /agents/:id"," tombstones the agent and purges its DO storage atomically.",[65,212,214],{"id":213},"quick-start","Quick start",[56,216,217],{},"You need:",[73,219,220,227,236],{},[76,221,222,223,226],{},"A deployed Sendook Worker (",[60,224,225],{},"wrangler deploy",").",[76,228,229,230,232,233,226],{},"Your ",[60,231,135],{}," secret value (set via ",[60,234,235],{},"wrangler secret put MASTER_KEY",[76,237,238,239,242,243,246],{},"The Worker's base URL (e.g. ",[60,240,241],{},"https://api.sendook.com"," or your ",[60,244,245],{},"*.workers.dev"," host).",[56,248,249],{},"Create an agent with the master key:",[251,252,257],"pre",{"className":253,"code":254,"language":255,"meta":256,"style":256},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -sX POST \"$SENDOOK_HOST/agents\" \\\n  -H \"Authorization: Bearer $SENDOOK_MASTER_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"Support Bot\"}'\n","bash","",[60,258,259,291,309,323],{"__ignoreMap":256},[260,261,264,267,271,274,278,282,285,288],"span",{"class":262,"line":263},"line",1,[260,265,62],{"class":266},"sBMFI",[260,268,270],{"class":269},"sfazB"," -sX",[260,272,273],{"class":269}," POST",[260,275,277],{"class":276},"sMK4o"," \"",[260,279,281],{"class":280},"sTEyZ","$SENDOOK_HOST",[260,283,284],{"class":269},"/agents",[260,286,287],{"class":276},"\"",[260,289,290],{"class":280}," \\\n",[260,292,294,297,299,302,305,307],{"class":262,"line":293},2,[260,295,296],{"class":269},"  -H",[260,298,277],{"class":276},[260,300,301],{"class":269},"Authorization: Bearer ",[260,303,304],{"class":280},"$SENDOOK_MASTER_KEY",[260,306,287],{"class":276},[260,308,290],{"class":280},[260,310,312,314,316,319,321],{"class":262,"line":311},3,[260,313,296],{"class":269},[260,315,277],{"class":276},[260,317,318],{"class":269},"Content-Type: application/json",[260,320,287],{"class":276},[260,322,290],{"class":280},[260,324,326,329,332,335],{"class":262,"line":325},4,[260,327,328],{"class":269},"  -d",[260,330,331],{"class":276}," '",[260,333,334],{"class":269},"{\"name\": \"Support Bot\"}",[260,336,337],{"class":276},"'\n",[56,339,340],{},"Response:",[251,342,346],{"className":343,"code":344,"language":345,"meta":256,"style":256},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"id\": \"abc123def456\",\n  \"email\": \"abc123def456@yourdomain.com\",\n  \"name\": \"Support Bot\",\n  \"api_key\": \"rA9...long-base64url\",\n  \"created_at\": 1730000000\n}\n","json",[60,347,348,353,376,395,415,435,451],{"__ignoreMap":256},[260,349,350],{"class":262,"line":263},[260,351,352],{"class":276},"{\n",[260,354,355,358,361,363,366,368,371,373],{"class":262,"line":293},[260,356,357],{"class":276},"  \"",[260,359,155],{"class":360},"spNyl",[260,362,287],{"class":276},[260,364,365],{"class":276},":",[260,367,277],{"class":276},[260,369,370],{"class":269},"abc123def456",[260,372,287],{"class":276},[260,374,375],{"class":276},",\n",[260,377,378,380,382,384,386,388,391,393],{"class":262,"line":311},[260,379,357],{"class":276},[260,381,159],{"class":360},[260,383,287],{"class":276},[260,385,365],{"class":276},[260,387,277],{"class":276},[260,389,390],{"class":269},"abc123def456@yourdomain.com",[260,392,287],{"class":276},[260,394,375],{"class":276},[260,396,397,399,402,404,406,408,411,413],{"class":262,"line":325},[260,398,357],{"class":276},[260,400,401],{"class":360},"name",[260,403,287],{"class":276},[260,405,365],{"class":276},[260,407,277],{"class":276},[260,409,410],{"class":269},"Support Bot",[260,412,287],{"class":276},[260,414,375],{"class":276},[260,416,418,420,422,424,426,428,431,433],{"class":262,"line":417},5,[260,419,357],{"class":276},[260,421,163],{"class":360},[260,423,287],{"class":276},[260,425,365],{"class":276},[260,427,277],{"class":276},[260,429,430],{"class":269},"rA9...long-base64url",[260,432,287],{"class":276},[260,434,375],{"class":276},[260,436,438,440,443,445,447],{"class":262,"line":437},6,[260,439,357],{"class":276},[260,441,442],{"class":360},"created_at",[260,444,287],{"class":276},[260,446,365],{"class":276},[260,448,450],{"class":449},"sbssI"," 1730000000\n",[260,452,454],{"class":262,"line":453},7,[260,455,456],{"class":276},"}\n",[56,458,459,460,462],{},"Save the ",[60,461,163],{}," — it is shown only once. From there, the agent can send mail with its own key:",[251,464,466],{"className":253,"code":465,"language":255,"meta":256,"style":256},"curl -sX POST \"$SENDOOK_HOST/agents/abc123def456/messages/send\" \\\n  -H \"Authorization: Bearer $AGENT_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"to\": \"alice@example.com\",\n    \"subject\": \"Hello from my agent\",\n    \"text\": \"This message was sent through Sendook.\"\n  }'\n",[60,467,468,487,502,514,522,527,532,537],{"__ignoreMap":256},[260,469,470,472,474,476,478,480,483,485],{"class":262,"line":263},[260,471,62],{"class":266},[260,473,270],{"class":269},[260,475,273],{"class":269},[260,477,277],{"class":276},[260,479,281],{"class":280},[260,481,482],{"class":269},"/agents/abc123def456/messages/send",[260,484,287],{"class":276},[260,486,290],{"class":280},[260,488,489,491,493,495,498,500],{"class":262,"line":293},[260,490,296],{"class":269},[260,492,277],{"class":276},[260,494,301],{"class":269},[260,496,497],{"class":280},"$AGENT_API_KEY",[260,499,287],{"class":276},[260,501,290],{"class":280},[260,503,504,506,508,510,512],{"class":262,"line":311},[260,505,296],{"class":269},[260,507,277],{"class":276},[260,509,318],{"class":269},[260,511,287],{"class":276},[260,513,290],{"class":280},[260,515,516,518,520],{"class":262,"line":325},[260,517,328],{"class":269},[260,519,331],{"class":276},[260,521,352],{"class":269},[260,523,524],{"class":262,"line":417},[260,525,526],{"class":269},"    \"to\": \"alice@example.com\",\n",[260,528,529],{"class":262,"line":437},[260,530,531],{"class":269},"    \"subject\": \"Hello from my agent\",\n",[260,533,534],{"class":262,"line":453},[260,535,536],{"class":269},"    \"text\": \"This message was sent through Sendook.\"\n",[260,538,540,543],{"class":262,"line":539},8,[260,541,542],{"class":269},"  }",[260,544,337],{"class":276},[56,546,547,548,550,551,63],{},"Inbound mail addressed to ",[60,549,390],{}," lands in the agent's mailbox, which you can read with ",[60,552,553],{},"GET /agents/abc123def456/messages",[65,555,557],{"id":556},"where-to-next","Where to next",[73,559,560,566,571],{},[76,561,562,565],{},[563,564,13],"a",{"href":14}," — deploy the Worker, wire Email Routing, set the secrets.",[76,567,568,570],{},[563,569,18],{"href":19}," — the seven workflows you'll touch in production.",[76,572,573,575],{},[563,574,24],{"href":25}," — every route, mapped to the Worker source.",[577,578,579],"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 .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 .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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":256,"searchDepth":293,"depth":293,"links":581},[582,583,584,585],{"id":67,"depth":293,"text":68},{"id":139,"depth":293,"text":140},{"id":213,"depth":293,"text":214},{"id":556,"depth":293,"text":557},"Welcome to Sendook — email infrastructure for AI agents on Cloudflare.","md",{},{"icon":11},{"title":10,"description":586},"ZLUKBby5tMwGJA0ARFOGi2hqq0eQVzKy2_DKOCxAGoc",[593,594],null,{"title":13,"path":14,"stem":15,"description":595,"icon":16,"children":-1},"Deploy the Sendook Worker on your Cloudflare account.",1778700750503]