SMS API by language: send and receive SMS from your own number
textbee is a REST API in front of an Android phone with a SIM. Any language that can make an HTTPS request with a header can send an SMS, receive replies by webhook, poll message history with a cursor and handle errors. Each page below has those four samples for one language, written with the standard library and executed against a mock of the API before it was published, plus notes on where the calls live in the common frameworks.
Updated
- PythonSend SMS, receive replies by webhook, poll with a cursor and handle errors in Python with the standard library, plus notes for Django, Flask and FastAPI.Updated September 5, 2026
- JavaScript and TypeScriptSend SMS, verify webhooks, poll with a cursor and handle errors in Node with fetch, with notes for Express and Next.js and the official TypeScript SDK.Updated September 5, 2026
- PHPSend SMS, verify webhooks, poll with a cursor and handle errors in PHP with the curl extension, plus how it fits in Laravel.Updated September 5, 2026
- JavaSend SMS, verify webhooks, poll with a cursor and handle errors in Java 17 with java.net.http, plus how it fits in Spring.Updated September 5, 2026
- GoSend SMS, verify webhooks, poll with a cursor and handle errors in Go with net/http, plus how it fits in Gin.Updated September 5, 2026
- RubySend SMS, verify webhooks, poll with a cursor and handle errors in Ruby with net/http and webrick, plus how it fits in Rails.Updated September 5, 2026
- curl and shellSend SMS, sign a webhook test event, poll with a cursor and handle errors from the shell with curl, jq and openssl.Updated September 5, 2026
What every language page has in common
Authentication is one header, x-api-key, scoped to your account. Sending is a POST to /gateway/send-sms with recipients in E.164 form. Receiving is either a signed webhook or a cursor over GET /gateway/messages, and both are shown. One phone sends roughly 10 to 15 messages a minute, so a large blast takes time to drain. Carriers can filter bulk patterns on consumer SIMs. Marketing messages still need consent from the recipient under the local rules.