Content-Type
If you are posting JSON in the body, you must set Content-Type: application/json
/messages
Send a message to a specific device, array of devices, or all devices subscribing to a UUID on the Meshblu platform
curl -X POST -H "Content-Type: application/json" -d '{"devices": "*", "payload": {"yellow":"off"}}' https://meshblu.octoblu.com/messages --header "meshblu_auth_uuid: {my uuid}" --header "meshblu_auth_token: {my token}"
curl -X POST -H "Content-Type: application/json" -d '{"devices": ["ad6...47b","2f3...170"], "payload": {"yellow":"off"}}' https://meshblu.octoblu.com/messages --header "meshblu_auth_uuid: {my uuid}" --header "meshblu_auth_token: {my token}"
curl -X POST -H "Content-Type: application/json" -d '{"devices": "ad698900-2546-11e3-87fb-c560cb0ca47b", "payload": {"yellow":"off"}}' https://meshblu.octoblu.com/messages --header "meshblu_auth_uuid: {my uuid}" --header "meshblu_auth_token: {my token}"
curl -X POST -H "Content-Type: application/json" -d '{"devices": "ad698900-2546-11e3-87fb-c560cb0ca47b/2f3113d0-2796-11e3-95ef-e3081976e170", "message": {"yellow":"off"}}' "https://localhost:3000/messages" --header "meshblu_auth_uuid: {my uuid}" --header "meshblu_auth_token: {my token}"
{"devices":"*","payload":{"yellow":"off"}}
NOTE:
If your Meshblu cloud is connected to meshblu.octoblu.com or other private Meshblu clouds, you can send messages across Meshblu clouds by chaining UUIDs together separated by slashes (/) where the first UUID is the target cloud and the second UUID is the device on that cloud.