{"__v":2,"_id":"558f82e11311b80d00ba9da1","category":{"__v":16,"_id":"5567425a1c38390d0069808b","pages":["5567425c1c38390d0069808d","558f782c1311b80d00ba9d97","558f7986f795be2d00c1164f","558f8069f795be2d00c11655","558f810bf795be2d00c11657","558f82e11311b80d00ba9da1","558f850df795be2d00c1165b","558f85401311b80d00ba9da3","558f85df1311b80d00ba9da5","558f87726742610d0051c4f5","558f87f26742610d0051c4f7","558f886df795be2d00c1165f","55918fec5631432f002d357e","559191f34e50b50d0019612a","5592c8d89a68220d00f1c404","559efaebdf92223500dc50e7"],"project":"556742591c38390d00698087","version":"5567425a1c38390d0069808a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-28T16:29:14.942Z","from_sync":false,"order":9999,"slug":"documentation","title":"Documentation"},"parentDoc":null,"project":"556742591c38390d00698087","user":"5564f227f0f70f0d00a9ab20","version":{"__v":2,"_id":"5567425a1c38390d0069808a","project":"556742591c38390d00698087","createdAt":"2015-05-28T16:29:14.412Z","releaseDate":"2015-05-28T16:29:14.412Z","categories":["5567425a1c38390d0069808b","57214d354758d90e009e6638"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-06-28T05:15:13.835Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":9,"body":"Send a message to one or more Meshblu devices. In order to send a device a message, the connection must be authenticated as a device that is in the recipient's `message.from` whitelist. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information.\n\n### Event: `\"message\"`, `message`\n\n* `message` Message object, must contain only the `devices` property. `topic` is treated special by Meshblu. Other properties are forwarded to the recipient(s), but Meshblu does not act on them in any way.\n  * `devices` Array of UUIDs of devices to send the message to. If any of the UUIDs are the special string `\"*\"`, then the message will also be emitted as a `broadcast` message, and can be picked up by anyone in the emitter's `broadcast.sent` whitelist.\n  * `topic` If the topic is provided as a string and the message is broadcast, the topic can be used by subscribers to filter incoming messages server-side.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Check the permissions\",\n  \"body\": \"In order to send a device a message, the connection must be authenticated as a device that is in the recipient's `message.from` whitelist. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"Meshblu does not currently provide any receipt confirmation natively. If a message is sent to an offline recipient that has no [message forwarding](https://meshblu.readme.io/docs/what-are-forwarders) or [device subscriptions](https://meshblu.readme.io/docs/how-subscriptions-work), the message will be dropped. If it is important to know when the recipient received a message, it is recommended to have the recipient send some form of acknowledgement message back.\"\n}\n[/block]","excerpt":"Send a Meshblu message","slug":"message","type":"basic","title":"Message"}

Message

Send a Meshblu message

Send a message to one or more Meshblu devices. In order to send a device a message, the connection must be authenticated as a device that is in the recipient's `message.from` whitelist. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information. ### Event: `"message"`, `message` * `message` Message object, must contain only the `devices` property. `topic` is treated special by Meshblu. Other properties are forwarded to the recipient(s), but Meshblu does not act on them in any way. * `devices` Array of UUIDs of devices to send the message to. If any of the UUIDs are the special string `"*"`, then the message will also be emitted as a `broadcast` message, and can be picked up by anyone in the emitter's `broadcast.sent` whitelist. * `topic` If the topic is provided as a string and the message is broadcast, the topic can be used by subscribers to filter incoming messages server-side. [block:callout] { "type": "warning", "title": "Check the permissions", "body": "In order to send a device a message, the connection must be authenticated as a device that is in the recipient's `message.from` whitelist. See the [Meshblu whitelist documentation](https://meshblu.readme.io/docs/whitelists-2-0) for more information." } [/block] [block:callout] { "type": "info", "title": "", "body": "Meshblu does not currently provide any receipt confirmation natively. If a message is sent to an offline recipient that has no [message forwarding](https://meshblu.readme.io/docs/what-are-forwarders) or [device subscriptions](https://meshblu.readme.io/docs/how-subscriptions-work), the message will be dropped. If it is important to know when the recipient received a message, it is recommended to have the recipient send some form of acknowledgement message back." } [/block]