JSON API » messages » messages/text/list
Gets array of fields of text messages.
Input parameters
Requires authentication and the texts role privilege.
Name | Type | Description | Required | Default value |
---|---|---|---|---|
auth_username | String | Authentication username. | Yes | |
auth_password | String | Authentication password. | Yes | |
customer | Integer | ID of customer. | No | Customer of authentication user. |
end | Integer | Only return messages received at or before this Unix timestamp. | No | Now. |
start | Integer | Only return messages received at or after this Unix timestamp. | No | 0 |
sort | String | Field to sort by. "body", "received", or "snumber". | No | "received" |
descending | Integer | 1 to sort descending, 0 not to. | No | 0 |
Responses
Code | Description |
---|---|
200 | Success. |
400 | Invalid input parameters specified. Check the key and message fields for more details. |
401 | The authentication details provided are invalid. |
402 | Your 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
Version | Changes |
---|---|
3.13 | Function added. |