Send your first custom notification by calling the API with your API Key and Device ID
curl --location '<https://alerty.dev/api/notify>' \\
--header 'Authorization: Bearer YOUR_API_KEY' \\
--data '{
"title": "alerty.dev test notification",
"message":"My first notification through the Alerty API!"
}'
Authentication to the API is performed via Bearer Auth:
'Authorization: Bearer YOUR_API_KEY'
Your API key is extremely sensitive, so be sure to keep it secure! Do not share your secret API keys in publicly accessible areas.
https://alerty.dev/api/notify
Body Payload
Body Parameter | Required | Type | Default | Description |
---|---|---|---|---|
message |
required | string | message is a string that includes information about the push notification | |
title |
optional | string | Title for your notification message | |
image |
optional | string | null | A string containing the URL of an image to be displayed in the notification. |
icon |
optional | string | Alerty Logo | A string containing the URL of an image to be used as an icon by the notification. |
device_id |
optional | string[] | All Active Devices | If no device_id[] is included, the push message will be sent to all active devices on your account. Otherwise, including device_id will ensure that the notification is only sent to the specific device. |
urgency |
optional | string, one of very-low , low , normal , high |
very-low |
Urgency is to indicate to the push service whether to send the notification immediately or prioritize the recipient’s device power considerations for delivery. Provide one of the following values: very-low , low , normal , or high . To attempt to deliver the notification immediately, specify high. |
actions |
optional | Actions Object | null | Allows users to take action on your notification, like opening a URL. |
Note: Actions are only supported on some platforms and devices. |