Sending Notifications
Notifications are sent using a POST request.
Endpoint
POST https://notifications.arifa.dev/notify
Notes
If you are running this from a script, make sure to include the Origin header. The value must match the domain you registered when creating a web API key; otherwise, the request will be rejected.
Required JSON Body
{
"recipient": "UUID_of_user",
"payload": { # Payload can be any JSON structure based on your need
"title": "Hello",
"body": "Welcome to Arifa!"
},
"api_key": "YOUR_API_KEY",
"client" : <"web" or "mobile">
}
Notes
- recipient → must be a valid UUID
- payload → must be valid JSON
- The
payloadfield can contain any JSON structure based on your needs — as long as it is valid JSON.- You can include custom keys
- Nested objects
- Arrays
- Any format your application requires
- The
- api_key → must be included and valid
- client →
"web"or"mobile"
curl -X POST https://notifications.arifa.dev/notify \
-H "Content-Type: application/json" \
-H "Origin: http://localhost:5173" \ # The registred domain for the api key if web
-d '{
"recipient": "e3ec1c15-baf1-4ebf-82df-3d0b66ed9982",
"payload": { "message": "Test" }, // Message can b
"api_key": <API KEY>,
"client" : "web"
}'