Creating the notification

To send the notification to the Stackmash servers, you will need to make a POST request. The parameters for this request are as follows:

Parameter Required Example Description
public_key STRING Yes W1uSDAp8uPu7h8TIPjX2E4ABWP9Kyuu
Plw8T
The public identifier for your project.
private_key STRING Yes jMN2Y1mMXwT6muxkAos27lC3eLSYcg
RuFfBdT4lkLYGlJXmIw9I3h3UcPTIp
The private key for your project (think of it like a password).
category STRING Yes user-registration The category ID that you would like to send notifications too.
title STRING Yes You have a new customer! The title of your notification.
body STRING/JSON No {"name":"Harry", "email":"harry@gmail.com"} The extra information related to your notification, we highly recommend using the JSON format, but if not valid, an unformatted string will show.
browser STRING No Chrome The browser the user is using.
os STRING No Windows 10 The operating system the user is using.
ip STRING No 192.168.10.10 The IP address the request was sent from.

And for the headers:

These headers must be added to avoid incorrect return values.

Key Value
Accept application/json
Content-Type application/json

HTTP status codes:

Code Description
200 (OK) Request was successful.
201 (OK) Request was successful & notification was created.
401 (Unauthorized) This will mean your project keys are incorrect.
403 (Forbidden) A 403 error will be returned if you have reached your notification limit for the month.
404 (Not found) You will get a 404 if the URL you are requesting is incorrect, or the category ID is incorrect.
422 (Unprocessable entity) Validation errors will result in a 422.
500, 502, 503, 504 (Error) These errors occur when something goes wrong our end. If you ever get this, please contact support immediately.

Errors:

Error HTTP Code Description
Incorrect project keys. 401 (Unauthorized) If you project is not found, it will be because your project keys are incorrect. Please check the section on finding your keys.
Notification limit exceeded. 403 (Forbidden) A 403 error will be returned if you have reached your notification limit for the month. You will need to upgrade to receive new notifications.
Category not found. 404 (Not found) This message will mean that the category ID you entered does not match to any categories added for the selected project. Make sure you are using the category ID and not the category name.
The given data was invalid. 422 (Unprocessable entity) This message will display if the validation checks on the parameters failed.

View examples