JSON API » messages » messages/copy

Copies voicemail or fax messages to another folder in the same mailbox or to another mailbox.

Input parameters

Requires authentication and the features, messages, or user role privileges.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
smailboxStringSource mailbox.Yes
sfolderStringSource folder. Most commonly "INBOX".Yes
dmailboxStringDestination mailbox.Yes
dfolderStringDestination folder. Most commonly "INBOX".Yes
messagesStringMessage files to copy. Separate multiple with commas.Yes
scustomerIntegerID of customer owning source mailbox.NoCustomer of authentication user.
dcustomerIntegerID of customer owning destination mailbox.NoCustomer of authentication user.

Responses

CodeDescription
204Success.
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 source or destination mailbox does not exist.
500The destination mailbox is full.

Data returned

No data is returned.

Example: To different folder in same mailbox

http://enswitch.example.com/api/json/messages/copy/?auth_username=user;auth_password=password;smailbox=1234;sfolder=INBOX;dmailbox=1234;dfolder=Old;messages=msg0001,msg0002

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Example: To different mailbox

http://enswitch.example.com/api/json/messages/copy/?auth_username=user;auth_password=password;smailbox=1234;sfolder=INBOX;dmailbox=1235;dfolder=INBOX;messages=msg0001,msg0002

{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }

Change history

VersionChanges
3.13Function added.