SMS

Get Responses by Time Frame

Changed on

Gets the messsages from a defined timeframe.

Pagination

This endpoint supports pagination using the page/max pattern:

Parameters:

  • page: Page number starting from 1 (default: 1)
  • max: Maximum results per page (default: 10, recommended: 10-100)
  • mobile: Required mobile number filter (E.164 format)
  • start/end: Optional date range filters

Response Structure: The response includes pagination metadata:

  • page.count: Total number of pages available
  • page.number: Current page number
  • total: Total count of SMS responses matching the filters

Navigation Examples:

# First page of responses for a mobile number (default)
GET /get-user-sms-responses.json?mobile=61478038915

# Second page with 25 results per page
GET /get-user-sms-responses.json?mobile=61478038915&page=2&max=25

# Responses within date range with pagination
GET /get-user-sms-responses.json?mobile=61478038915&start=2020-04-01T00:00:00Z&end=2020-04-30T23:59:59Z&max=50

# Navigate through all pages
GET /get-user-sms-responses.json?mobile=61478038915&page=1&max=20
GET /get-user-sms-responses.json?mobile=61478038915&page=2&max=20
# Continue until page.number >= page.count

Best Practices:

  • Use max=10-25 for UI display of conversation history
  • Use max=50-100 for data export or analysis tasks
  • Always specify date ranges for large datasets to improve performance
  • Check page.count to determine if more pages exist
  • Use sorting parameters (sort_field, order) to organize results effectively
  • Consider the mobile number is required - this endpoint is designed for per-contact message history
get/get-user-sms-responses.json

Request

  • Base URL
    https://api.transmitsms.com
  • Auth
    HTTP basic

Query parameters

mobileinteger required

The mobile number of the recipient. Number must be defined in E.164 international format. You can use countrycode parameter to format numbers that are in local format.

countrycodestring

Format the mobile number to international format using 2-letter ISO 3166 country code or country name. 2 letter ISO 3166 format country code or country name. Automatically formats numbers to international format required for reliable SMS delivery. eg. In Australia 0422222222 will become 6142222222 when set to AU or Australia. If not set to numbers must be defined in E.164 international format.

COUNTRYCOUNTRY CODELOCALINTERNATIONAL
Australiaau049157015661491570156
New Zealandnz021267012964212670129
United Kingdomgb075001769644750017696
United Statesus251355114512513551145
startstring date-time

The start date and time to filter messages. Must be in ISO8601 format YYYY-MM-DD HH:MM:SS utilizing UTC Timezone. If start and end date not supplied, will get everything from the account registration to current date.

endstring date-time

The end date and time to filter messages. Must be in ISO8601 format YYYY-MM-DD HH:MM:SS utilizing UTC Timezone. If start and end date not supplied, will get everything from the account registration to current date.

sort_fieldstring

Sort by one of the following fields: delivery_status, message_id, datetime_send.

orderstring

Order by either ascending (asc) or descending (desc).

pageinteger

Page number for pagination.

maxinteger

Maximum results returned per page.

Response

OK

idinteger

Numeric ID assigned to the message received.

message_idinteger

Numeric ID assigned to the message that was responded to.

list_idinteger

Numeric ID of the list that the original message was sent to. Returns 0 if message was not sent to a list.

received_atstring date-time

Date and time that response was received to your account. Returned in ISO8601 format YYYY-MM-DD HH:MM:SS in UTC Timezone.

first_namestring

First name of responder. Retrieved from list contact if available.

last_namestring

Last name of responder. Retrieved from list contact if available.

msisdninteger

Mobile number of responder.

Changes