Wiki

Clone wiki

Numera.LibrisAPI / device.create_mailbox_message

Home > API Reference Documentation > device.create_mailbox_message

device.create_mailbox_message

The device.create_mailbox_message action is used to place a message in the mailbox of the device. This will initiate an SMS message being sent to the device, and IF the radios are on in the device, it will read the mailbox and process your message. This requires Agent Supervisor or higher permissions.

Input Parameters

PropertyRequiredDescription
idyesThe id of the device
messageyesA JSON object representing the entire mailbox message
topicyesThe label of the message, should match first property in message, see example below

Example

For example, to have the device play a chime for a period of time (either to help someone find their device or as a reminder) you can send the following message. Then you would use the device.read_mailbox action to watch for when the message has been read by the device and acknowledged (deleted from the mailbox). The number_plays parameter specifies how many times to replay the audio, which is about 2 seconds per play.

This would be the message:

{"FD_CMD":{"number_plays":20}}

The topic would be: FD_CMD

Output

The result object will be empty.

Possible Status Codes

Status CodeReasonDescription
1000NO_IDYou have to send in the device id
1001DEVICE_DOES_NOT_EXISTCould not locate the device or the user does not have access to it
1002NO_MESSAGEYou have to send in message
1003NO_TOPICYou have to send in the topic

Updated