Engineering at Handset

Engineering and founder notes from the team building Handset, the business phone API. Subscribe via RSS

Exactly-once is a WHERE clause: surviving duplicate carrier webhooks

Carriers deliver webhooks at least once, out of order, and sometimes twice under different ids. Here is how Handset turns that into one message status, one billed minute, and one event to your endpoint, with a unique index, a handful of guarded UPDATEs, and no dedupe service.

Jose Zamudio · Founder, Handset

·7 min read

Latest

·4 min read

How to add texting to your SaaS without becoming a telecom company

Your users want two-way texting inside your product. The five-minute Twilio demo hides an iceberg: 10DLC registration per customer, a number per tenant, STOP handling, opt-out law, and multi-tenant isolation. Here is the whole iceberg, and the shortcut around it.

Jose Zamudio

·4 min read

An MCP server that refuses to hand out live keys

We shipped an MCP server so an AI agent can run a phone system: send texts, place calls, read transcripts, buy numbers. The most important code in it is the part that refuses to start. Here is the safety model for handing a phone to an agent.

Jose Zamudio

·6 min read

Charging for usage without ever double-billing

A usage-based API has one bug it cannot ship: charging twice. Here is how Handset meters prepaid usage against an append-only ledger, why idempotency lives in a unique index instead of application code, and the migration that almost back-billed every account on day one.

Jose Zamudio

·6 min read

Anatomy of a media gateway: raw call audio over WebSockets

How Handset streams live call audio in both directions: two socket faces, one neutral frame protocol, drop-oldest buffering, and a Postgres row that coordinates a teardown across two processes.

Jose Zamudio

·7 min read

We built a fake carrier so you never have to test against a real one

Test keys on Handset run a complete simulated carrier behind the same interface as the real one: delivery receipts, replies, ringing phones, even raw call audio. Here is how it is built and why it is a product feature, not a test helper.

Jose Zamudio

·6 min read

What actually gets a 10DLC campaign rejected

We registered our own brand and campaign through the API we built. It failed twice before it passed. Here is every reason, with the exact statuses, so you do not have to find out yourself.

Jose Zamudio