REST /api/v1/pause-notification-payloads 5 endpoints
GET /api/v1/pause-notification-payloads/api/v1/pause-notification-payloads

List all available notification payload templates

Auth Required coordinatororg_adminglobal_admin

Response Example

{
  "data": [
    {
      "id": "coordinator-pause",
      "type": "coordinator_pause",
      "title": "Peer Mentor Pause – Coordinator Notice",
      "description": "Notifies coordinator when a peer mentor activates pause"
    },
    {
      "id": "coordinator-resume",
      "type": "coordinator_resume",
      "title": "Peer Mentor Resume – Coordinator Notice",
      "description": "Notifies coordinator when a peer mentor deactivates pause"
    },
    {
      "id": "peer-mentor-pause-confirm",
      "type": "peer_mentor_pause_confirmation",
      "title": "Pause Confirmation – Peer Mentor",
      "description": "Confirmation sent to peer mentor on pause activation"
    },
    {
      "id": "peer-mentor-resume-confirm",
      "type": "peer_mentor_resume_confirmation",
      "title": "Resume Confirmation – Peer Mentor",
      "description": "Confirmation sent to peer mentor on pause deactivation"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 4
  }
}
GET /api/v1/pause-notification-payloads/api/v1/pause-notification-payloads/:id

Get a rendered notification payload template by template ID

Auth Required coordinatororg_adminglobal_admin

Response Example

{
  "id": "coordinator-pause",
  "type": "coordinator_pause",
  "title": "Peer Mentor Pause – Coordinator Notice",
  "body": "Kari Nordmann has activated a pause effective 20 March 2026. Reason: Personal leave.",
  "data": {
    "event": "pause_activated",
    "peer_mentor_id": "pm_551e8400"
  }
}
POST /api/v1/pause-notification-payloads/api/v1/pause-notification-payloads

Build a rendered notification payload for a pause/resume event (buildCoordinatorPausePayload, buildPeerMentorPauseConfirmation, etc.)

Auth Required coordinatororg_admin

Request Example

{
  "payload_type": "coordinator_pause",
  "peer_mentor_name": "Kari Nordmann",
  "date": "2026-03-20T00:00:00.000Z",
  "reason": "Personal leave"
}

Response Example

{
  "id": "payload_3c4d5e6f7a8b",
  "payload_type": "coordinator_pause",
  "title": "Peer Mentor Pause Notification",
  "body": "Kari Nordmann has activated a pause effective 20 March 2026. Reason: Personal leave.",
  "data": {
    "event": "pause_activated",
    "peer_mentor_name": "Kari Nordmann",
    "effective_date": "2026-03-20T00:00:00.000Z"
  },
  "created_at": "2026-03-19T14:29:58.000Z"
}
PUT /api/v1/pause-notification-payloads/api/v1/pause-notification-payloads/:id

Update a notification payload template body or title

Auth Required org_adminglobal_admin

Request Example

{
  "title": "Peer Mentor Status Change – Coordinator Notice",
  "body_template": "{{peer_mentor_name}} has activated a pause effective {{date}}. Reason: {{reason}}."
}

Response Example

{
  "id": "coordinator-pause",
  "title": "Peer Mentor Status Change – Coordinator Notice",
  "body_template": "{{peer_mentor_name}} has activated a pause effective {{date}}. Reason: {{reason}}.",
  "updated_at": "2026-03-26T09:15:00.000Z"
}
DELETE /api/v1/pause-notification-payloads/api/v1/pause-notification-payloads/:id

Delete a custom notification payload template

Auth Required global_admin

Response Example

{
  "message": "Payload template deleted",
  "deleted_id": "coordinator-pause",
  "deleted_at": "2026-03-26T09:20:00.000Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}