| Api call | URL | Method | Description |
|---|---|---|---|
| Notify | /publicapi/notify | POST | Sends a notification to your device(s) |
| Verify | /publicapi/verify | GET | Verifies an API key |
Notify
/publicapi/notify
This is what you use to send a notification. You can include an unlimited number of API Keys in your call.
You can also send pushmessages to your device from any email account. Check out the Api keys page for more information!| Parameter | Length (bytes) | Description |
|---|---|---|
| apikey* | unlimited | A single apikey or a commaseparated list of apikeys. Each apikey must be a 48 bytes hex string. |
| application* | 256 (max) | The name of the application the notification originates from. |
| event* | 1000 (max) | The event that occured. Depending on your application, this might be a summary, subject or a brief explanation. |
| description* | 10 000 (max) | The full body of the notification. |
| priority | - | An optional value representing the priority of the notification. |
| type | xml/json | Specifies the responsetype you want. You can currently choose between JSON or XML (default) |
| * Required | ||
| Code | Description |
|---|---|
| 200 | Notification submitted. |
| 400 | The data supplied is in the wrong format, invalid length or null. |
| 401 | None of the API keys provided were valid. |
| 402 | Maximum number of API calls for a given period is exeeded |
| 500 | Internal server error. Please contact our support if the problem persists. |
Verify
/publicapi/verify
This call verifies an API key and should always be used when you receive an API key from a user for the first time.
| Parameter | Length (bytes) | Description |
|---|---|---|
| apikey* | 48 | A single apikey. |
| * Required | ||
| Code | Description |
|---|---|
| 200 | The API key is valid |
| 400 | The data supplied is in the wrong format, invalid length or null. |
| 401 | The API key is invalid |
| 402 | Maximum number of API calls for a given period is exeeded |
| 500 | Internal server error. Please contact our support if the problem persists. |
Response messages
<success> tag.
<nmwp> <success Code="200">The key is valid</success> </nmwp>
<nmwp> <success Code="200" /> </nmwp>
<error> tag. This element contains the code of the error, and also a more descriptive errormessage.
<nmwp> <error Code="401">The key is invalid</error> </nmwp>
<nmwp> <error Code="400">Event is required</error> </nmwp>