REST /api/v1/notification-preferences 7 endpoints
GET /api/v1/notification-preferences/api/v1/notification-preferences

List all notification preference records (admin use)

Public

Response Example

{
  "data": [
    {
      "preference_id": "pref-110",
      "user_id": "usr-441",
      "category": "deadline_reminder",
      "enabled": true,
      "updated_at": "2026-03-20T10:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 3
  }
}
GET /api/v1/notification-preferences/api/v1/notification-preferences/:id

Get a single preference record by ID

Public

Response Example

{
  "preference_id": "pref-110",
  "user_id": "usr-441",
  "category": "deadline_reminder",
  "enabled": true,
  "updated_at": "2026-03-20T10:00:00Z"
}
POST /api/v1/notification-preferences/api/v1/notification-preferences

Create a new notification preference entry for a user

Public

Request Example

{
  "user_id": "usr-441",
  "category": "assignment_posted",
  "enabled": true
}

Response Example

{
  "preference_id": "pref-130",
  "user_id": "usr-441",
  "category": "assignment_posted",
  "enabled": true,
  "updated_at": "2026-03-26T08:00:00Z"
}
PUT /api/v1/notification-preferences/api/v1/notification-preferences/:id

Update a preference (enable/disable a category)

Public

Request Example

{
  "category": "deadline_reminder",
  "enabled": false
}

Response Example

{
  "preference_id": "pref-110",
  "user_id": "usr-441",
  "category": "deadline_reminder",
  "enabled": false,
  "updated_at": "2026-03-26T09:30:00Z"
}
DELETE /api/v1/notification-preferences/api/v1/notification-preferences/:id

Delete a preference record

Public

Response Example

{
  "deleted": true,
  "preference_id": "pref-110"
}
GET /api/v1/notification-preferences/api/v1/notification-preferences/user/:user_id

Get all preferences for a specific user

Public

Response Example

{
  "user_id": "usr-441",
  "preferences": [
    {
      "category": "deadline_reminder",
      "enabled": true
    },
    {
      "category": "assignment_posted",
      "enabled": true
    },
    {
      "category": "status_change",
      "enabled": false
    }
  ]
}
POST /api/v1/notification-preferences/api/v1/notification-preferences/user/:user_id/reset

Reset all preferences to defaults for a user

Public

Response Example

{
  "user_id": "usr-441",
  "reset": true,
  "preferences": [
    {
      "category": "deadline_reminder",
      "enabled": true
    },
    {
      "category": "assignment_posted",
      "enabled": true
    },
    {
      "category": "status_change",
      "enabled": true
    }
  ]
}

Additional Metadata

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