Receive SMS API: read incoming replies
Read the SMS people sent back, without receiving webhooks.
Last updated
GET
/api/v1/messages/inboundReturns received SMS in the order they reached DroidSender. It is the alternative to the received webhook when you have no server that accepts requests: a script that runs every minute is enough.
| Parameter | What for |
|---|---|
| since | ISO 8601 date: the ones that arrived from then on |
| cursor | the nextCursor of the previous response; takes priority over since |
| limit | 1 to 100, 50 by default |
| from | only the ones from a number, in any format |
| deviceId | only the ones one phone received |
| reference | only the replies to sends with this reference |
{
"messages": [
{
"id": "msg_01H8Z",
"from": "+14155550100",
"message": "YES",
"receivedAt": "2026-08-14T10:30:44.000Z",
"conversationId": "conv_9f21",
"deviceId": "dev_oppo_cph2577",
"inReplyTo": {
"id": "msg_01H8X",
"reference": "appointment_8841",
"body": "Can you confirm your appointment tomorrow at 10am? Reply YES",
"sentAt": "2026-08-14T09:02:11.000Z"
}
}
],
"nextCursor": "MjAyNi0wOC0xNFQxMDozMDo0NS4xMjNafG1zZ18wMUg4Wg",
"hasMore": false
}Read every minute
curl "https://api.droidsender.com/api/v1/messages/inbound?since=2026-08-14T00:00:00Z" \
-H "X-API-Key: DS-live-your-key"import pathlib, requests
# runs every minute (cron); keeps the cursor between runs
state = pathlib.Path("cursor.txt")
params = {"cursor": state.read_text()} if state.exists() else {"since": "2026-08-14T00:00:00Z"}
while True:
r = requests.get(
"https://api.droidsender.com/api/v1/messages/inbound",
headers={"X-API-Key": "DS-live-your-key"},
params=params,
).json()
for m in r["messages"]:
print(m["from"], m["message"], (m["inReplyTo"] or {}).get("reference"))
state.write_text(r["nextCursor"])
if not r["hasMore"]:
break
params = {"cursor": r["nextCursor"]}// store nextCursor wherever you like (database, file)
let cursor = await loadSavedCursor();
do {
const url = new URL("https://api.droidsender.com/api/v1/messages/inbound");
if (cursor) url.searchParams.set("cursor", cursor);
const r = await fetch(url, { headers: { "X-API-Key": "DS-live-your-key" } }).then((x) => x.json());
for (const m of r.messages) await handleReply(m);
cursor = r.nextCursor;
await saveCursor(cursor);
if (!r.hasMore) break;
} while (true);An SMS shows up here up to 10 seconds after it arrives. Reading does not mark the conversation as read. History imported when a phone connects is not included, same as the webhook.