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.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
mailboxStringMailbox containing message.Yes
folderStringFolder containing message. Most commonly "INBOX".Yes
messageStringMessage file to get.Yes
listenedInteger1 to mark message as listened to, 0 not to.No1
customerIntegerID of customer owning mailbox.NoCustomer of authentication user.
encodingString"base64" to return file base64 encoded, "raw" to return raw data.No"raw"
wrapString"json" to return file in a JSON object, "none" to return plain file.No"json"

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.
404The 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

VersionChanges
3.15wrap parameter added.
3.14listened parameter added.
3.13Function added.