Pause Notification Orchestrator
API Contract
REST
/api/v1/pause-notifications
6 endpoints
GET
/api/v1/pause-notifications/api/v1/pause-notifications
List all pause notification events with pagination
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"data": [
{
"id": "pn_8a1b2c3d4e5f",
"peer_mentor_id": "pm_551e8400",
"event_type": "pause_activated",
"effective_date": "2026-03-20T00:00:00.000Z",
"reason": "Personal leave",
"coordinator_id": "coord_9f8e7d6c",
"notifications_sent": [
"coordinator_email",
"peer_mentor_push"
],
"created_at": "2026-03-19T14:30:00.000Z"
},
{
"id": "pn_6b7c8d9e0f1a",
"peer_mentor_id": "pm_662f9511",
"event_type": "pause_deactivated",
"effective_date": "2026-03-26T00:00:00.000Z",
"reason": null,
"coordinator_id": "coord_2a3b4c5d",
"notifications_sent": [
"coordinator_email",
"peer_mentor_push"
],
"created_at": "2026-03-25T09:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}
GET
/api/v1/pause-notifications/api/v1/pause-notifications/:id
Get details of a specific pause notification event
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"id": "pn_8a1b2c3d4e5f",
"peer_mentor_id": "pm_551e8400",
"event_type": "pause_activated",
"effective_date": "2026-03-20T00:00:00.000Z",
"reason": "Personal leave",
"coordinator_id": "coord_9f8e7d6c",
"notifications_sent": [
"coordinator_email",
"peer_mentor_push"
],
"dispatch_results": [
{
"channel": "push",
"recipient_id": "coord_9f8e7d6c",
"status": "delivered",
"sent_at": "2026-03-19T14:30:05.000Z"
},
{
"channel": "in_app",
"recipient_id": "pm_551e8400",
"status": "delivered",
"sent_at": "2026-03-19T14:30:06.000Z"
}
],
"created_at": "2026-03-19T14:30:00.000Z"
}
POST
/api/v1/pause-notifications/api/v1/pause-notifications
Manually trigger a pause activation notification (handlePauseActivated)
Auth Required
coordinatororg_admin
Request Example
{
"peer_mentor_id": "pm_551e8400",
"event_type": "pause_activated",
"effective_date": "2026-03-20T00:00:00.000Z",
"reason": "Personal leave"
}
Response Example
{
"id": "pn_8a1b2c3d4e5f",
"peer_mentor_id": "pm_551e8400",
"event_type": "pause_activated",
"effective_date": "2026-03-20T00:00:00.000Z",
"coordinator_id": "coord_9f8e7d6c",
"notifications_sent": [
"coordinator_push",
"peer_mentor_push"
],
"created_at": "2026-03-19T14:30:00.000Z"
}
PUT
/api/v1/pause-notifications/api/v1/pause-notifications/:id
Update a pause notification event (e.g. correct reason or effective date)
Auth Required
org_adminglobal_admin
Request Example
{
"reason": "Extended medical leave",
"effective_date": "2026-03-21T00:00:00.000Z"
}
Response Example
{
"id": "pn_8a1b2c3d4e5f",
"peer_mentor_id": "pm_551e8400",
"event_type": "pause_activated",
"effective_date": "2026-03-21T00:00:00.000Z",
"reason": "Extended medical leave",
"coordinator_id": "coord_9f8e7d6c",
"updated_at": "2026-03-19T15:00:00.000Z"
}
DELETE
/api/v1/pause-notifications/api/v1/pause-notifications/:id
Delete a pause notification record
Auth Required
global_admin
Response Example
{
"message": "Pause notification record deleted",
"deleted_id": "pn_8a1b2c3d4e5f",
"deleted_at": "2026-03-26T09:00:00.000Z"
}
GET
/api/v1/pause-notifications/api/v1/pause-notifications/resolve-coordinator/:peerMentorId
Resolve the responsible coordinator for a given peer mentor (resolveCoordinator)
Auth Required
coordinatororg_adminglobal_admin
Response Example
{
"peer_mentor_id": "pm_551e8400",
"coordinator_id": "coord_9f8e7d6c",
"coordinator_name": "Ingrid Bakke",
"coordinator_email": "ingrid.bakke@nhf-oslo.no"
}