JSON API » messages » messages/text/list

Gets array of fields of text messages.

Input parameters

Requires authentication and the texts role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
customerIntegerID of customer.NoCustomer of authentication user.
endIntegerOnly return messages received at or before this Unix timestamp.NoNow.
startIntegerOnly return messages received at or after this Unix timestamp.No0
sortStringField to sort by. "body", "received", or "snumber".No"received"
descendingInteger1 to sort descending, 0 not to.No0

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.

Data returned

An array of fields, corresponding to the text messages.

Example: With required parameters

http://enswitch.example.com/api/json/messages/text/list/?auth_username=user;auth_password=password

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "uniqueid":"1234567890", "received":1234567890, ... }, { "uniqueid":"1234567891", "received":1234567891, ... } ] }

Change history

VersionChanges
3.13Function added.