Hono Pages: Send Only
Cloudflare Pages Functions + Hono send template with:
- advanced send route (
POST /send) using rawSendInputJSON (single or batch) - SMS shortcut route (
POST /send/sms)
Install
Section titled “Install”cd examples/hono-pages-send-onlybun installConfigure
Section titled “Configure”- Copy
.dev.vars.exampleto.dev.vars. - Fill IWINV provider secrets.
bun run devEndpoint
Section titled “Endpoint”POST /send(advanced single/batch)POST /send/sms
For batch requests to POST /send, the route always returns 200.
Check per-item success/failure in data.results.
Advanced request body (single, raw SendInput):
{ "type": "SMS", "to": "01012345678", "text": "hello from advanced route", "from": "01000000000", "providerId": "iwinv"}Advanced request body (batch, raw SendInput[]):
[ { "type": "SMS", "to": "01012345678", "text": "hello from advanced route #1", "from": "01000000000", "providerId": "iwinv" }, { "type": "SMS", "to": "01012345679", "text": "hello from advanced route #2", "from": "01000000000", "providerId": "iwinv" }]SMS shortcut request body:
{ "to": "01012345678", "text": "hello", "from": "01000000000"}