{"_id":"55674ce31c38390d006980c7","category":{"_id":"55674b187acd550d0075eb14","pages":["55674b197acd550d0075eb16","55674c1d77c15523002fd5a3","55674c2d7acd550d0075eb1d","55674c9a77c15523002fd5a9","55674ce31c38390d006980c7","55674d1d7acd550d0075eb22","55674d7a77c15523002fd5b4","55674dac77c15523002fd5b6","55674e4c77c15523002fd5bb"],"__v":9,"project":"55674b177acd550d0075eb10","version":"55674b187acd550d0075eb13","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-28T17:06:32.570Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"version":{"_id":"55674b187acd550d0075eb13","__v":1,"project":"55674b177acd550d0075eb10","createdAt":"2015-05-28T17:06:32.083Z","releaseDate":"2015-05-28T17:06:32.083Z","categories":["55674b187acd550d0075eb14"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":3,"project":"55674b177acd550d0075eb10","user":"5564f227f0f70f0d00a9ab20","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-28T17:14:11.341Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"/messages\"\n}\n[/block]\nSend a message to a specific device, array of devices, or all devices subscribing to a UUID on the Meshblu platform\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"coap post -p '{\\\"devices\\\": \\\"*\\\", \\\"payload\\\": {\\\"yellow\\\":\\\"off\\\"}}' -H \\\"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\\\" coap://meshblu-coap.octoblu.com/messages\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"coap post -p '{\\\"devices\\\": [\\\"ad6...47b\\\",\\\"2f3...170\\\"], \\\"payload\\\": {\\\"yellow\\\":\\\"off\\\"}}' -H \\\"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\\\" coap://meshblu-coap.octoblu.com/messages\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"coap post -p '{\\\"devices\\\": \\\"ad698900-2546-11e3-87fb-c560cb0ca47b\\\", \\\"payload\\\": {\\\"yellow\\\":\\\"off\\\"}}' coap://meshblu-coap.octoblu.com/messages\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"devices\\\":\\\"*\\\",\\n  \\\"payload\\\":{  \\n    \\\"yellow\\\":\\\"off\\\"\\n  }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"messages","type":"basic","title":"Messages"}
[block:api-header] { "type": "post", "title": "/messages" } [/block] Send a message to a specific device, array of devices, or all devices subscribing to a UUID on the Meshblu platform [block:code] { "codes": [ { "code": "coap post -p '{\"devices\": \"*\", \"payload\": {\"yellow\":\"off\"}}' -H \"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\" coap://meshblu-coap.octoblu.com/messages", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "coap post -p '{\"devices\": [\"ad6...47b\",\"2f3...170\"], \"payload\": {\"yellow\":\"off\"}}' -H \"meshblu_auth_uuid={:UUID}&meshblu_auth_token={:TOKEN}\" coap://meshblu-coap.octoblu.com/messages", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "coap post -p '{\"devices\": \"ad698900-2546-11e3-87fb-c560cb0ca47b\", \"payload\": {\"yellow\":\"off\"}}' coap://meshblu-coap.octoblu.com/messages", "language": "shell" } ] } [/block] [block:code] { "codes": [ { "code": "{ \n \"devices\":\"*\",\n \"payload\":{ \n \"yellow\":\"off\"\n }\n}", "language": "json" } ] } [/block]