SubSift API

REST API for managing subscriptions, renewals, and notifications. All endpoints return JSON and are versioned under /api/v1/.

Online
Version 1.0
Laravel 13
Sanctum Auth
🌐

Overview

Base URL and authentication
Base URL http://api.sub-sift.pro/api/v1
Authentication: Protected endpoints require a Bearer token obtained from /api/v1/auth/login or /api/v1/auth/register. Pass it in the Authorization header: Authorization: Bearer <token>
📦

Response Format

All responses follow a consistent envelope

Success

"success": true,
"message": "Operation successful",
"data": { /* payload */ }

Error

"success": false,
"message": "Error description",
"errors": { /* validation errors */ }

Paginated List

"success": true,
"data": [ /* array of items */ ],
"meta": {
  "current_page": 1,
  "last_page": 3,
  "per_page": 15,
  "total": 42
}

HTTP Status Codes

CodeMeaning
200OK — request succeeded
201Created — resource created
401Unauthenticated — missing or invalid token
403Forbidden — insufficient permissions
404Not Found — resource does not exist
422Unprocessable — validation failed
500Server Error — unexpected failure
🔐

Authentication

Register, login, and manage user sessions
POST /api/v1/auth/register Register a new user Public

Request Body

FieldTypeRequired
namestringrequired
emailstring (email)required
passwordstring (min 8)required
password_confirmationstringrequired

Response 201

"success": true,
"message": "Registered successfully",
"data": {
  "token": "1|abc123...",
  "user": {
    "id": 1,
    "name": "John",
    "email": "john@example.com"
  }
}
POST /api/v1/auth/login Authenticate and get token Public

Request Body

FieldTypeRequired
emailstring (email)required
passwordstringrequired

Response 200

"success": true,
"message": "Login successful",
"data": {
  "token": "2|xyz456...",
  "user": { /* user object */ }
}
GET /api/v1/auth/me Get authenticated user Protected

Headers

HeaderValue
AuthorizationBearer <token>

Response 200

"success": true,
"data": {
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "created_at": "2025-01-01T00:00:00Z"
}
POST /api/v1/auth/logout Revoke current token Protected

Response 200

"success": true,
"message": "Logged out successfully"
POST /api/v1/auth/forgot-password Send password reset link Public

Request Body

FieldTypeRequired
emailstring (email)required

Response 200

"success": true,
"message": "Password reset link sent"
POST /api/v1/auth/reset-password Complete password reset Public

Request Body

FieldTypeRequired
tokenstringrequired
emailstring (email)required
passwordstring (min 8)required
password_confirmationstringrequired

Response 200

"success": true,
"message": "Password reset successfully"
📋

Subscriptions

Manage user subscriptions — all endpoints require authentication
GET /api/v1/subscriptions List all subscriptions Protected

Query Parameters

ParamType
pageintegeroptional
per_pageintegeroptional

Response 200

"data": [
  {
    "id": 1,
    "name": "Netflix",
    "amount": 549.00,
    "currency": "PHP",
    "billing_cycle": "monthly",
    "next_billing_date": "2025-05-01"
  }
],
"meta": { /* pagination */ }
POST /api/v1/subscriptions Create a subscription Protected

Request Body

FieldTypeRequired
namestringrequired
amountnumericrequired
currencystringrequired
billing_cyclestringrequired
next_billing_datedaterequired
descriptionstringoptional
categorystringoptional
notify_days_beforeintegeroptional

Response 201

"success": true,
"message": "Subscription created",
"data": {
  "id": 5,
  "name": "Spotify",
  /* ... full subscription object */
}
GET /api/v1/subscriptions/{id} Get a subscription Protected

Path Parameters

ParamTypeDescription
idintegerSubscription ID
PUT /api/v1/subscriptions/{id} Update a subscription Protected

Request Body

Same fields as Create — all optional.

FieldTypeRequired
namestringoptional
amountnumericoptional
currencystringoptional
billing_cyclestringoptional
next_billing_datedateoptional
descriptionstringoptional
categorystringoptional
notify_days_beforeintegeroptional
DELETE /api/v1/subscriptions/{id} Delete a subscription Protected

Response 200

"success": true,
"message": "Subscription deleted"
GET /api/v1/subscriptions/summary Cost analytics summary Protected

Response 200

"data": {
  "total_monthly": 1250.00,
  "total_yearly": 15000.00,
  "currency": "PHP",
  "active_count": 8,
  "by_category": [ /* grouped totals */ ]
}
GET /api/v1/subscriptions/upcoming Upcoming renewals Protected

Query Parameters

ParamType
daysintegeroptional (default 7)

Response 200

"data": [
  {
    "id": 3,
    "name": "Adobe CC",
    "next_billing_date": "2025-04-26",
    "days_until": 3
  }
]
🔔

Notifications

Renewal reminders and alerts — all endpoints require authentication
GET /api/v1/notifications List notifications (paginated) Protected

Query Parameters

ParamType
pageintegeroptional
per_pageintegeroptional

Response 200

"data": [
  {
    "id": 10,
    "message": "Netflix renews in 3 days",
    "is_read": false,
    "created_at": "2025-04-23T08:00:00Z"
  }
],
"meta": { /* pagination */ }
GET /api/v1/notifications/unread-count Get unread notification count Protected

Response 200

"data": {
  "unread_count": 4
}
PATCH /api/v1/notifications/{id}/read Mark notification as read Protected

Response 200

"success": true,
"message": "Notification marked as read"
PATCH /api/v1/notifications/read-all Mark all notifications as read Protected

Response 200

"success": true,
"message": "All notifications marked as read"