{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/message","auth":"required","settings":"","examples":{"codes":[{"language":"python","code":"data = {\n  'message': 'FIRE! FIRE! I\\'d love some help.', \n  'level': 5, \n  'secret': 'd2d1820d56b862a6f5b1a69a7af730fa',\n}\n\nresp = requests.post('https://api.pushjet.io/message', data=data).json()","name":""},{"language":"go","code":"package main\n\nimport (\n\tpushjet \"github.com/geir54/goPushJet\" // 3rd party library\n)\n\nfunc main() {\n\terr := pushjet.SendMessage(\n    \"d2d1820d56b862a6f5b1a69a7af730fa\", \n    \"Test msg\", \n    \"FIRE! FIRE! I\\'d love some help.\", \n     5, \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}"}]},"method":"post","params":[{"name":"secret","type":"string","default":"d2d1820d56b862a6f5b1a69a7af730fa","desc":"The service secret token","required":true,"in":"body","ref":"","_id":"555fa194d7777119003ad005"},{"name":"message","type":"string","default":"Your server is on fire!!:::at:::#!","desc":"The notification text","required":true,"in":"body","ref":"","_id":"555fa194d7777119003ad004"},{"name":"title","type":"string","default":"Big server #5","desc":"A custom message title","required":false,"in":"body","ref":"","_id":"555fa194d7777119003ad003"},{"name":"level","type":"int","default":"3","desc":"The importance level from 1(low) to 5(high)","required":false,"in":"body","ref":"","_id":"555fa194d7777119003ad002"},{"name":"link","type":"string","default":"http://i.imgur.com/TerUkQY.gif","desc":"An optional link","required":false,"in":"body","ref":"","_id":"555fa194d7777119003ad001"}],"results":{"codes":[{"code":"{\n\t'status': 'ok'\n}","name":"","status":200,"language":"json"},{"status":404,"language":"json","code":"{\n \t'error': {\n    'id': 6,\n   \t'message': 'Service not found',\n  }\n}"}]}},"next":{"description":"","pages":[]},"title":"Send a message","type":"endpoint","slug":"send-a-message","excerpt":"","body":"Used to send messages to all the devices that are subscribed to the service the message is sent from. Upon receiving reading confirmations from all the target devices the message will be deleted.","updates":["5726460c87539a0e00062acd","5a09818495110600242e490d"],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"555fa194d7777119003ad000","__v":2,"editedParams2":true,"user":"555f9a010758330d000d531a","category":{"sync":{"isSync":false,"url":""},"pages":["555fa194d7777119003ad000","555fa2e5d7777119003ad008","555fa3abd7777119003ad00d"],"title":"Message","slug":"message","order":1,"from_sync":false,"reference":false,"_id":"555fa040d7777119003acffd","project":"555f9bf814d68e0d00966587","__v":3,"createdAt":"2015-05-22T21:31:44.995Z","version":"555f9bf814d68e0d0096658a"},"createdAt":"2015-05-22T21:37:24.909Z","githubsync":"","parentDoc":null,"project":"555f9bf814d68e0d00966587","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["555f9bf814d68e0d0096658b","555f9e9ed7777119003acfee","555fa040d7777119003acffd","555fa344d7777119003ad00b","555fa3e6d7777119003ad00f","555fb694336c041700a9b86e","555fb779336c041700a9b86f","555fb86bd7777119003ad039","555fbf1a336c041700a9b87f"],"_id":"555f9bf814d68e0d0096658a","project":"555f9bf814d68e0d00966587","releaseDate":"2015-05-22T21:13:28.470Z","__v":9,"createdAt":"2015-05-22T21:13:28.470Z"},"editedParams":true}

postSend a message


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

secret:
required
stringd2d1820d56b862a6f5b1a69a7af730fa
The service secret token
message:
required
stringYour server is on fire!!@#!
The notification text
title:
stringBig server #5
A custom message title
level:
integer3
The importance level from 1(low) to 5(high)
link:
stringhttp://i.imgur.com/TerUkQY.gif
An optional link

Examples


Result Format


Documentation

Used to send messages to all the devices that are subscribed to the service the message is sent from. Upon receiving reading confirmations from all the target devices the message will be deleted.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}