Push Notification Service
API Contract
REST
/api/v1/push-notifications
8 endpoints
GET
/api/v1/push-notifications/api/v1/push-notifications
List all sent push notifications
Public
Response Example
{
"data": [
{
"id": "notif-0055",
"user_id": "mentor-42",
"title": "Certification expiring soon",
"body": "Your Peer Mentor Level 2 certification expires in 14 days. Please renew.",
"status": "delivered",
"sent_at": "2026-03-26T08:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 234
}
}
GET
/api/v1/push-notifications/api/v1/push-notifications/:id
Get a single push notification record
Public
Response Example
{
"id": "notif-0055",
"user_id": "mentor-42",
"title": "Certification expiring soon",
"body": "Your Peer Mentor Level 2 certification expires in 14 days. Please renew.",
"data": {
"screen": "certifications",
"mentor_id": "mentor-42"
},
"platform": "ios",
"device_token": "abc123devicetoken",
"status": "delivered",
"sent_at": "2026-03-26T08:00:00Z",
"opened_at": "2026-03-26T08:12:00Z"
}
POST
/api/v1/push-notifications/api/v1/push-notifications
Send a push notification to a single user (maps to sendPushNotification)
Public
Request Example
{
"user_id": "mentor-42",
"title": "Certification expiring soon",
"body": "Your Peer Mentor Level 2 certification expires in 14 days. Please renew.",
"data": {
"screen": "certifications",
"mentor_id": "mentor-42"
}
}
Response Example
{
"id": "notif-0056",
"user_id": "mentor-42",
"title": "Certification expiring soon",
"body": "Your Peer Mentor Level 2 certification expires in 14 days. Please renew.",
"data": {
"screen": "certifications",
"mentor_id": "mentor-42"
},
"status": "delivered",
"sent_at": "2026-03-26T10:00:00Z"
}
PUT
/api/v1/push-notifications/api/v1/push-notifications/:id
Update notification record status (e.g. mark opened)
Public
Request Example
{
"status": "opened",
"opened_at": "2026-03-26T10:15:00Z"
}
Response Example
{
"id": "notif-0055",
"status": "opened",
"opened_at": "2026-03-26T10:15:00Z",
"updated_at": "2026-03-26T10:15:00Z"
}
DELETE
/api/v1/push-notifications/api/v1/push-notifications/:id
Delete a notification record
Public
Response Example
{
"deleted": true,
"id": "notif-0055"
}
POST
/api/v1/push-notifications/api/v1/push-notifications/batch
Send push notifications to multiple users (maps to sendBatchNotifications)
Public
Request Example
{
"user_ids": [
"mentor-19",
"mentor-55",
"mentor-78"
],
"payload": {
"title": "Certification renewal reminder",
"body": "Your certification is expiring soon. Please take action.",
"data": {
"screen": "certifications"
}
}
}
Response Example
{
"batch_id": "batch-0012",
"total": 3,
"delivered": 3,
"failed": 0,
"sent_at": "2026-03-26T10:00:00Z"
}
POST
/api/v1/push-notifications/api/v1/push-notifications/device-tokens
Register a device token for a user (maps to registerDeviceToken)
Public
Request Example
{
"user_id": "mentor-42",
"token": "ExponentPushToken[xxxxxx]",
"platform": "ios"
}
Response Example
{
"id": "dtoken-0034",
"user_id": "mentor-42",
"token": "ExponentPushToken[xxxxxx]",
"platform": "ios",
"registered_at": "2026-03-26T10:00:00Z"
}
DELETE
/api/v1/push-notifications/api/v1/push-notifications/device-tokens/:token
Remove a device token for a user (maps to removeDeviceToken)
Public
Response Example
{
"deleted": true,
"token": "ExponentPushToken[xxxxxx]",
"user_id": "mentor-42"
}