Admin Notify Archives List
Admin Notify Archives List
List archived notify subscriptions with pagination support.
Endpoint
POST /api/admin/notify/archives/list
Authentication
Requires Bearer token authentication.
Authorization: Bearer <ADMIN_API_TOKEN>
Request
Headers
| Header | Required | Value |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | Yes | Bearer <token> |
Body
interface AdminArchiveListRequest {
page?: number; // Page number (1-based, default: 1)
pageSize?: number; // Items per page (default: 20, max: 100)
productSlug?: string; // Filter by product slug
status?: string; // Filter by original status
}
Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
page | number | No | 1 | Page number (1-based) |
pageSize | number | No | 20 | Items per page (max: 100) |
productSlug | string | No | - | Filter by product slug |
status | string | No | - | Filter by original status |
Example Request
# Get first page of archives
curl -X POST https://preview--takazudomodular.netlify.app/api/admin/notify/archives/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ADMIN_API_TOKEN" \
-d '{}'
# Get page 2 with 10 items per page
curl -X POST https://preview--takazudomodular.netlify.app/api/admin/notify/archives/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ADMIN_API_TOKEN" \
-d '{ "page": 2, "pageSize": 10 }'
# Filter by product
curl -X POST https://preview--takazudomodular.netlify.app/api/admin/notify/archives/list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ADMIN_API_TOKEN" \
-d '{ "productSlug": "n32b-slim" }'
Response
Success Response (200)
interface AdminArchiveListResponse {
success: true;
subscriptions: NotifySubscription[]; // Array of archived subscriptions
total: number; // Total count of archived subscriptions
page: number; // Current page number
pageSize: number; // Items per page
totalPages: number; // Total number of pages
}
Example Success Response
{
"success": true,
"subscriptions": [
{
"id": "mock-sub-001",
"email": "user1@example.com",
"productSlug": "n32b-slim",
"createdAt": "2024-01-15T10:30:00Z",
"status": "notified",
"notifiedAt": "2024-01-20T12:00:00Z",
"isArchived": true,
"archivedAt": "2024-02-01T09:00:00Z"
},
{
"id": "mock-sub-002",
"email": "user2@example.com",
"productSlug": "module-x",
"createdAt": "2024-01-10T09:00:00Z",
"status": "pending",
"isArchived": true,
"archivedAt": "2024-02-01T09:00:00Z"
}
],
"total": 15,
"page": 1,
"pageSize": 20,
"totalPages": 1
}
Empty Result
{
"success": true,
"subscriptions": [],
"total": 0,
"page": 1,
"pageSize": 20,
"totalPages": 0
}
Error Responses
Validation Error (400)
{
"success": false,
"error": "pageSize must be between 1 and 100"
}
Authentication Error (401)
{
"success": false,
"error": "Unauthorized"
}
Behavior
- Fetches all notify subscriptions where
isArchived === true - Applies optional filters (productSlug, status)
- Sorts by
archivedAtdescending (most recently archived first) - Paginates results based on page and pageSize parameters
- Returns paginated list with metadata
Subscription Object
| Field | Type | Description |
|---|---|---|
id | string | Unique subscription ID |
email | string | Subscriber’s email address |
productSlug | string | Product identifier |
status | string | Original status when archived |
createdAt | string | ISO 8601 timestamp of subscription creation |
notifiedAt | string | null | ISO 8601 timestamp when notified |
isArchived | boolean | Always true for archived subscriptions |
archivedAt | string | ISO 8601 timestamp when archived |
Sorting
Results are sorted by archivedAt in descending order (most recently archived first).
Related Endpoints
- Admin Notify Archive - Archive subscriptions
- Admin Notify List - List active (non-archived) subscriptions
- Admin Notify Status - Update subscription status