JSON API » messages » messages/get
Gets the fields of a voicemail or fax message, including the message file.
Input parameters
Requires authentication and the features, messages, or user role privileges.
| Name | Type | Description | Required | Default value | 
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| mailbox | String | Mailbox containing message. | Yes | |
| folder | String | Folder containing message. Most commonly "INBOX". | Yes | |
| message | String | Message file to get. | Yes | |
| listened | Integer | 1 to mark message as listened to, 0 not to. | No | 1 | 
| customer | Integer | ID of customer owning mailbox. | No | Customer of authentication user. | 
| encoding | String | "base64" to return file base64 encoded, "raw" to return raw data. | No | "raw" | 
| wrap | String | "json" to return file in a JSON object, "none" to return plain file. | No | "json" | 
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. | 
| 404 | The mailbox or message does not exist. | 
Data returned
Fields of message.
Example: With required parameters
http://enswitch.example.com/api/json/messages/get/?auth_username=user;auth_password=password;mailbox=1234;folder=INBOX;message=msg0001{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":{ "name":"msg0001", "mimetype":"audio/x-wav", ... } }
Change history
| Version | Changes | 
|---|---|
| 3.15 | wrap parameter added. | 
| 3.14 | listened parameter added. | 
| 3.13 | Function added. | 
