{"_id":"56f40e3d7ea0091700f63a6f","project":"54eb50e5615ffc1900305a16","user":"5683bbad70331a0d00484b27","__v":3,"editedParams2":true,"category":{"_id":"57a9ce2fac6db30e000d7efd","__v":0,"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-08-09T12:35:59.736Z","from_sync":false,"order":7,"slug":"push-messages","title":"Push messages"},"version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":26,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"editedParams":true,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-24T15:56:45.967Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"method":"post","results":{"codes":[{"name":"","status":200,"language":"json","code":"{  \n   \"messages\":[  \n      {  \n         \"to\":\"5d4997zd-c858-4c21-be53-f235ce35f412\",\n         \"status\":{  \n            \"groupId\":0,\n            \"groupName\":\"ACCEPTED\",\n            \"id\":0,\n            \"name\":\"MESSAGE_ACCEPTED\",\n            \"description\":\"Message accepted\"\n         },\n         \"messageCount\":1,\n         \"messageId\":\"1220cc164279-2b34-71236-cbb2-1327af1edfd2\"\n      }\n   ]\n}"},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"BAD_REQUEST\",\n      \"text\": \"Bad request\"\n    }\n  }\n}","name":"","status":400,"language":"json"},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"UNAUTHORIZED\",\n      \"text\": \"Invalid login details\"\n    }\n  }\n}","language":"json","status":401}]},"settings":"554860d6d2c8410d006c215e","examples":{"codes":[{"code":"POST /push/1/single HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\nAccept: application/json\n\n{  \n   \"from\":\"233623e3c860b49ec69a464834343481-8bj4el4a-256d-23fd-56ad-b5bc3d568b53\",\n   \"to\":\"41793026727\",\n   \"text\":\"Test PUSH.\",\n   \"customPayload\":{\"url\":\"someUrl\",\"someValue\":\"value\"}\n}","language":"json","name":""}]},"auth":"required","params":[{"_id":"55155f2abc466623002afe8b","ref":"","in":"body","required":true,"desc":"PUSH Application Code you are using to send messages","default":"","type":"string","name":"from"},{"_id":"55155f2abc466623002afe8a","ref":"","in":"body","required":true,"desc":"Push Registration Id or MSISDN (if it is provided over mobile messaging SDK). MSISDN must be in international format (Example: `41793026727`).","default":"","type":"string","name":"to"},{"_id":"55155f2abc466623002afe89","ref":"","in":"body","required":true,"desc":"Text of the message that will be sent.","default":"","type":"string","name":"text"},{"_id":"5745a8dbc067580e0056b249","ref":"","in":"body","required":false,"desc":"Extra information delivered with a notification. Formatted as custom JSON object.","default":"","type":"object","name":"customPayload"}],"url":"/push/:version/single"},"isReference":true,"order":7,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"PUSH Application Code\",\n  \"body\": \"Application Code is the application identifier which links your mobile application to the application profile created in [Infobip Platform](http://portal.infobip.com/push/applications). It is required to insert the Application Code in Mobile Messaging SDK configuration once you implement it in your mobile application.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Push Registration Id is unique ID which identifies application instance and specific device.\",\n  \"title\": \"Push Registration Id\"\n}\n[/block]\n# Response format\n\nOn success, response header HTTP status code will be `200 OK` and the message will be sent.\n\nIf you try to send message without authorization, you will receive an `401 Unauthorized` error.\n\nOn a wrongly formatted request the HTTP status code will be `400 Bad Request`.\n\n### PUSHResponse\n\n|Parameter|Type|Description|\n|-|-|-|\n|*to*|String|Push Registration Id.|\n|*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.|\n|*messageCount*|int|The number of sent messages.|\n|*messageId*|String|The ID that uniquely identifies the message sent.|\n\n#### Status\n\n|Parameter|Type|Description|\n|-|-|-|\n|*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).|\n|*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#section-status-object-example).|\n|*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.|\n|*action*|String|[Action](http://dev.infobip.com/v1/docs/response-codes#status-object-example) that should be taken to eliminate the error.|\n\n------ \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Info\",\n  \"body\": \"After you have sent a couple of PUSH messages, you are able to check if they were successfully delivered by using the [Sent PUSH mesages reports](doc:push-sent-messages-reports)\"\n}\n[/block]\n------\n\n### **Next:** [Send multiple PUSH messages](doc:send-multiple-push)","excerpt":"This method allows you to send a single PUSH message to one registered device on a specific PUSH application.","slug":"send-single-push","type":"endpoint","title":"Single PUSH message"}

postSingle PUSH message

This method allows you to send a single PUSH message to one registered device on a specific PUSH application.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

from:
required
string
PUSH Application Code you are using to send messages
to:
required
string
Push Registration Id or MSISDN (if it is provided over mobile messaging SDK). MSISDN must be in international format (Example: `41793026727`).
text:
required
string
Text of the message that will be sent.
customPayload:
object
Extra information delivered with a notification. Formatted as custom JSON object.

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "PUSH Application Code", "body": "Application Code is the application identifier which links your mobile application to the application profile created in [Infobip Platform](http://portal.infobip.com/push/applications). It is required to insert the Application Code in Mobile Messaging SDK configuration once you implement it in your mobile application." } [/block] [block:callout] { "type": "info", "body": "Push Registration Id is unique ID which identifies application instance and specific device.", "title": "Push Registration Id" } [/block] # Response format On success, response header HTTP status code will be `200 OK` and the message will be sent. If you try to send message without authorization, you will receive an `401 Unauthorized` error. On a wrongly formatted request the HTTP status code will be `400 Bad Request`. ### PUSHResponse |Parameter|Type|Description| |-|-|-| |*to*|String|Push Registration Id.| |*status*|[Status](#section-status)|Indicates whether the message is successfully sent, not sent, delivered, not delivered, waiting for delivery or any other possible status.| |*messageCount*|int|The number of sent messages.| |*messageId*|String|The ID that uniquely identifies the message sent.| #### Status |Parameter|Type|Description| |-|-|-| |*groupId*|int|Status [group ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*groupName*|String|Status [group name](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*id*|int|Status [ID](http://dev.infobip.com/v1/docs/response-codes#status-object-example).| |*name*|String|Status [name](http://dev.infobip.com/v1/docs/response-codes#section-status-object-example).| |*description*|String|Human readable [description](http://dev.infobip.com/v1/docs/response-codes#status-object-example) of the status.| |*action*|String|[Action](http://dev.infobip.com/v1/docs/response-codes#status-object-example) that should be taken to eliminate the error.| ------ [block:callout] { "type": "info", "title": "Info", "body": "After you have sent a couple of PUSH messages, you are able to check if they were successfully delivered by using the [Sent PUSH mesages reports](doc:push-sent-messages-reports)" } [/block] ------ ### **Next:** [Send multiple PUSH messages](doc:send-multiple-push)