List replies
/v1/inbound Scopereports:read
Replies people sent to your numbers, newest first.
SMS21 acts on opt-out keywords itself: a reply starting with STOP (or UNSUBSCRIBE, CANCEL, …) adds the sender to your opt-out list, and START removes them. action says what happened.
Parameters9
fromquerystringSender, international format.
toquerystringOne of your numbers, international format.
actionquerystringOnly replies SMS21 acted on (or did not).
receivedFromquerystring (date-time)Inclusive lower bound on arrival time.
receivedToquerystring (date-time)Inclusive upper bound on arrival time.
channelquerystringOnly messages that arrived this way.
limitqueryintegercursorquerystringpagination.nextCursorof the previous page.pagequeryintegerPage number (1-based) for numbered pagination with
pagination.total. Ignored withcursor; to read everything, followcursorinstead (faster on large lists).
Responses
- 200
A page of replies.
- 400
Invalid filter or cursor.
Example
Response 400{ "success": false, "error": { "code": "INVALID_RECIPIENT", "message": "The number is not a valid mobile number", "details": [ { "field": "from", "message": "must be in international format" } ] }, "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d" } - 401
The API key is missing, malformed, unknown, revoked or expired.
Example
Response 401{ "success": false, "error": { "code": "AUTHENTICATION_REQUIRED", "message": "An API key is required; send it in the X-API-Key header or as \"Authorization: Bearer <key>\"" }, "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d" } - 403
The key may not do this: missing scope, IP not on the allow-list, company, project or key suspended by SMS21, project archived, wallet suspended or destination blocked.
Example
Response 403{ "success": false, "error": { "code": "INSUFFICIENT_SCOPE", "message": "This API key does not have the required scope", "details": [ { "message": "requires scope sms:send" } ] }, "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d" } - 429
Rate limited. Wait
Retry-Afterseconds, then retry with the same Idempotency-Key.Example
Response 429{ "success": false, "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded for this API key" }, "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d" } - 503
Temporarily unavailable, or live sending paused by SMS21. Retry later with the same Idempotency-Key.
Example
Response 503{ "success": false, "error": { "code": "SERVICE_UNAVAILABLE", "message": "Service temporarily unavailable" }, "requestId": "0199491c-8f3a-7c2e-9b1d-5e7f3a2c4b6d" }
curl -X GET "https://sms21.in/v1/inbound" \
-H "X-API-Key: $SMS21_API_KEY"{
"success": true,
"data": [
{
"inboundId": "inb_01k55q8y4m3d9v7x2c6b0n1r8t",
"from": "919876543210",
"to": "919812345678",
"numberId": "num_01k55q8y4m3d9v7x2c6b0n1r8t",
"text": "STOP",
"segments": 1,
"keyword": "STOP",
"action": "opt_out",
"receivedAt": "2026-09-15T10:30:00.000Z",
"channel": "sms",
"deviceId": null,
"senderName": null,
"groupId": null,
"media": null
}
],
"pagination": {
"limit": 20,
"hasMore": false,
"nextCursor": null
}
}