{"_id":"5717252b2be45f0e00caae95","user":"5683bbad70331a0d00484b27","__v":3,"editedParams2":true,"version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"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","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"parentDoc":null,"project":"54eb50e5615ffc1900305a16","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":8,"slug":"push-messages","title":"Push messages"},"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-04-20T06:43:55.609Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":true,"api":{"examples":{"codes":[{"language":"json","code":"POST /push/1/multi 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   \"text\":\"Test broadcast PUSH messages.\"\n}","name":""}]},"method":"post","results":{"codes":[{"code":"{  \n  \"bulkId\": \"3382845430\"\n}","language":"json","status":200,"name":""},{"name":"","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"BAD_REQUEST\",\n      \"text\": \"Bad request\"\n    }\n  }\n}","language":"json","status":400},{"code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"UNAUTHORIZED\",\n      \"text\": \"Invalid login details\"\n    }\n  }\n}","language":"json","status":401}]},"settings":"554860d6d2c8410d006c215e","auth":"required","params":[{"_id":"55155f2abc466623002afe8b","ref":"","in":"body","required":true,"desc":"PUSH application code identifying the PUSH application you are using to send messages","default":"","type":"string","name":"from"},{"_id":"55155f2abc466623002afe89","ref":"","in":"body","required":true,"desc":"Text of the message that will be sent.","default":"","type":"string","name":"text"},{"_id":"55155f2abc466623002afe8a","ref":"","in":"body","required":false,"desc":"Type of cloud platform the messages should be sent to. Possible values are `GCM` for Android users of your application or `APNS` for iOS users. By excluding this field the messages will be sent to all users.","default":"","type":"string","name":"cloudType"},{"_id":"573dcd861ad1a30e00a84df8","ref":"","in":"body","required":false,"desc":"The message validity period in hours. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).","default":"","type":"int","name":"validityPeriod"},{"_id":"573dcd861ad1a30e00a84df7","ref":"","in":"body","required":false,"desc":"Date and time when the messages are going to be sent. Used for scheduled PUSH (messages are not sent immediately, but at scheduled time).","default":"","type":"datetime","name":"sendAt"},{"_id":"5745a8fbc067580e0056b24a","ref":"","in":"body","required":false,"desc":"Extra information delivered with notification. Formatted as custom JSON object.","default":"","type":"object","name":"customPayload"}],"url":"/push/:version/multi"},"isReference":true,"order":8,"body":"# Response format\n\nOn success, the response header HTTP status code will be `200 OK` and the message will be sent.\n\nIf you try to send the message without authorization, you will receive the `401 Unauthorized` error.\n\n### Response\n\n|Parameter|Type|Description|\n|-|-|-|\n|*bulkId*|long|The ID that uniquely identifies the request. Using this identifier You can check the status of sent messages.|\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"BROADCAST MESSAGES\",\n  \"body\": \"This method allows you to broadcast messages to all users on a specific PUSH application. By defining `cloudType` parameter broadcast to Android or iOS users.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Additional examples\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Broadcast messages to Android users\"\n}\n[/block]\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /push/1/multi 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   \\\"text\\\":\\\"Test broadcast PUSH messages to Android users.\\\",\\n   \\\"cloudType\\\":\\\"GCM\\\"   \\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"bulkId\\\": \\\"3382845230\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Schedule broadcasting to iOS users\"\n}\n[/block]\n**Request**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /push/1/multi 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   \\\"text\\\":\\\"Test broadcast PUSH messages to Android users.\\\",\\n   \\\"cloudType\\\":\\\"APNS\\\",\\n   \\\"sendAt\\\":\\\"2016-07-07T17:00:00.000+01:00\\\",\\n   \\\"customPayload\\\":{\\\"url\\\":\\\"someUrl\\\",\\\"someValue\\\":\\\"value\\\"}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Response**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n  \\\"bulkId\\\": \\\"4382825230\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nUsing the bulkId provided in the response retreive statistics for sent broadcast messages using the [Get message statistics method](doc:push-messages-statistics) \n\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"For detailed Delivery Reports for each message sent in Your bulk request the following method can be used : [Sent PUSH messages reports](doc:push-sent-messages-reports)\",\n  \"title\": \"Info\"\n}\n[/block]","excerpt":"This method allows you to send multiple PUSH message to users registered on a specific PUSH application.","slug":"send-multiple-push","type":"endpoint","title":"Multiple PUSH messages"}

postMultiple PUSH messages

This method allows you to send multiple PUSH message to users registered on a specific PUSH application.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

from:
required
string
PUSH application code identifying the PUSH application you are using to send messages
text:
required
string
Text of the message that will be sent.
cloudType:
string
Type of cloud platform the messages should be sent to. Possible values are `GCM` for Android users of your application or `APNS` for iOS users. By excluding this field the messages will be sent to all users.
validityPeriod:
integer
The message validity period in hours. When the period expires, it will not be allowed for the message to be sent. Validity period longer than 48h is not supported (in this case, it will be automatically set to 48h).
sendAt:
datetime
Date and time when the messages are going to be sent. Used for scheduled PUSH (messages are not sent immediately, but at scheduled time).
customPayload:
object
Extra information delivered with notification. Formatted as custom JSON object.

Examples


Result Format


Documentation

# Response format On success, the response header HTTP status code will be `200 OK` and the message will be sent. If you try to send the message without authorization, you will receive the `401 Unauthorized` error. ### Response |Parameter|Type|Description| |-|-|-| |*bulkId*|long|The ID that uniquely identifies the request. Using this identifier You can check the status of sent messages.| [block:callout] { "type": "info", "title": "BROADCAST MESSAGES", "body": "This method allows you to broadcast messages to all users on a specific PUSH application. By defining `cloudType` parameter broadcast to Android or iOS users." } [/block] [block:api-header] { "type": "basic", "title": "Additional examples" } [/block] [block:api-header] { "type": "basic", "title": "Broadcast messages to Android users" } [/block] **Request** [block:code] { "codes": [ { "code": "POST /push/1/multi 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 \"text\":\"Test broadcast PUSH messages to Android users.\",\n \"cloudType\":\"GCM\" \n}", "language": "json" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{ \n \"bulkId\": \"3382845230\"\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Schedule broadcasting to iOS users" } [/block] **Request** [block:code] { "codes": [ { "code": "POST /push/1/multi 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 \"text\":\"Test broadcast PUSH messages to Android users.\",\n \"cloudType\":\"APNS\",\n \"sendAt\":\"2016-07-07T17:00:00.000+01:00\",\n \"customPayload\":{\"url\":\"someUrl\",\"someValue\":\"value\"}\n}", "language": "json" } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{ \n \"bulkId\": \"4382825230\"\n}", "language": "json" } ] } [/block] Using the bulkId provided in the response retreive statistics for sent broadcast messages using the [Get message statistics method](doc:push-messages-statistics) [block:callout] { "type": "info", "body": "For detailed Delivery Reports for each message sent in Your bulk request the following method can be used : [Sent PUSH messages reports](doc:push-sent-messages-reports)", "title": "Info" } [/block]