{"_id":"57fcc4870312b20e00ac650a","category":{"_id":"57fcc4860312b20e00ac64cb","__v":0,"version":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-24T21:45:44.150Z","from_sync":false,"order":10,"slug":"api-methods","title":"API Methods"},"parentDoc":null,"__v":0,"project":"5435687035740020002a1c04","user":"54497cce27b7fc140078d9a5","version":{"_id":"57fcc4860312b20e00ac64c0","project":"5435687035740020002a1c04","__v":1,"createdAt":"2016-10-11T10:52:54.637Z","releaseDate":"2016-10-11T10:52:54.637Z","categories":["57fcc4860312b20e00ac64c1","57fcc4860312b20e00ac64c2","57fcc4860312b20e00ac64c3","57fcc4860312b20e00ac64c4","57fcc4860312b20e00ac64c5","57fcc4860312b20e00ac64c6","57fcc4860312b20e00ac64c7","57fcc4860312b20e00ac64c8","57fcc4860312b20e00ac64c9","57fcc4860312b20e00ac64ca","57fcc4860312b20e00ac64cb"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"[APP-1265], [APP-1035]","version_clean":"5.2.0","version":"5.2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-24T22:01:31.727Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":21,"body":"Telemetry supports sending notifications to a particular board using the API.\n\n## Notification Object\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Required\",\n    \"h-2\": \"Type\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"title\",\n    \"0-3\": \"The title for the notification. Up to 255 characters.\",\n    \"1-3\": \"The message to show. Up to 255 characters.\",\n    \"2-3\": \"An optional icon. Must be the name of an icon from the [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/) library of icons.\",\n    \"3-3\": \"How long to display the alert for in seconds (optional, defaults to 10, minimum 1)\",\n    \"4-3\": \"An optional URL for a sound to play. Can also be set to 'default' to use a default sound.\",\n    \"4-2\": \"string\",\n    \"3-2\": \"number\",\n    \"2-2\": \"string\",\n    \"1-2\": \"string\",\n    \"0-2\": \"string\",\n    \"1-0\": \"message\",\n    \"2-0\": \"icon\",\n    \"3-0\": \"duration\",\n    \"4-0\": \"sound_url\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n## List Notifications\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"GET https://api.telemetrytv.com/notifications\",\n  \"body\": \"This method will return a list of all notifications.\"\n}\n[/block]\n\n## List Notifications of a Channel\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"GET https://api.telemetrytv.com/channels/:id/notifications\",\n  \"body\": \"This method will return a list of all notifications of the channel.\"\n}\n[/block]\n## Send a Notification to a Channel\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"This method will create a new notification. Notifications appear at the bottom of the board as specified by the channel ID.\\nNote that either title and message or sound are required. All three may be present as well.\",\n  \"title\": \"POST https://api.telemetrytv.com/channels/:channel_id/notifications\"\n}\n[/block]\n## Send a Notification to a Flow's Channel\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST https://api.telemetrytv.com/flows/:tag/notifications\",\n  \"body\": \"This method will create a new notification. Notifications appear at the bottom of the board as specified by the flow tag.\\nNote that either title and message or sound are required. All three may be present as well.\"\n}\n[/block]\n\n## Delete a Notification\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"DELETE https://api.telemetrytv.com/notifications/:id\",\n  \"body\": \"This method will delete a notification object.\"\n}\n[/block]","excerpt":"","slug":"notifications","type":"basic","title":"Notifications"}
Telemetry supports sending notifications to a particular board using the API. ## Notification Object [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Required", "h-2": "Type", "h-3": "Description", "0-0": "title", "0-3": "The title for the notification. Up to 255 characters.", "1-3": "The message to show. Up to 255 characters.", "2-3": "An optional icon. Must be the name of an icon from the [Font Awesome](http://fortawesome.github.io/Font-Awesome/icons/) library of icons.", "3-3": "How long to display the alert for in seconds (optional, defaults to 10, minimum 1)", "4-3": "An optional URL for a sound to play. Can also be set to 'default' to use a default sound.", "4-2": "string", "3-2": "number", "2-2": "string", "1-2": "string", "0-2": "string", "1-0": "message", "2-0": "icon", "3-0": "duration", "4-0": "sound_url" }, "cols": 4, "rows": 5 } [/block] ## List Notifications [block:callout] { "type": "info", "title": "GET https://api.telemetrytv.com/notifications", "body": "This method will return a list of all notifications." } [/block] ## List Notifications of a Channel [block:callout] { "type": "info", "title": "GET https://api.telemetrytv.com/channels/:id/notifications", "body": "This method will return a list of all notifications of the channel." } [/block] ## Send a Notification to a Channel [block:callout] { "type": "success", "body": "This method will create a new notification. Notifications appear at the bottom of the board as specified by the channel ID.\nNote that either title and message or sound are required. All three may be present as well.", "title": "POST https://api.telemetrytv.com/channels/:channel_id/notifications" } [/block] ## Send a Notification to a Flow's Channel [block:callout] { "type": "success", "title": "POST https://api.telemetrytv.com/flows/:tag/notifications", "body": "This method will create a new notification. Notifications appear at the bottom of the board as specified by the flow tag.\nNote that either title and message or sound are required. All three may be present as well." } [/block] ## Delete a Notification [block:callout] { "type": "danger", "title": "DELETE https://api.telemetrytv.com/notifications/:id", "body": "This method will delete a notification object." } [/block]