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
| Code | Meaning |
|---|---|
200 | OK — request succeeded |
201 | Created — resource created |
401 | Unauthenticated — missing or invalid token |
403 | Forbidden — insufficient permissions |
404 | Not Found — resource does not exist |
422 | Unprocessable — validation failed |
500 | Server Error — unexpected failure |
Authentication
Register, login, and manage user sessions
POST
/api/v1/auth/register
Register a new user
Public
▼
Request Body
| Field | Type | Required |
|---|---|---|
name | string | required |
email | string (email) | required |
password | string (min 8) | required |
password_confirmation | string | required |
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
| Field | Type | Required |
|---|---|---|
email | string (email) | required |
password | string | required |
Response 200
"success": true, "message": "Login successful", "data": { "token": "2|xyz456...", "user": { /* user object */ } }
GET
/api/v1/auth/me
Get authenticated user
Protected
▼
Headers
| Header | Value |
|---|---|
Authorization | Bearer <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
| Field | Type | Required |
|---|---|---|
email | string (email) | required |
Response 200
"success": true, "message": "Password reset link sent"
POST
/api/v1/auth/reset-password
Complete password reset
Public
▼
Request Body
| Field | Type | Required |
|---|---|---|
token | string | required |
email | string (email) | required |
password | string (min 8) | required |
password_confirmation | string | required |
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
| Param | Type | |
|---|---|---|
page | integer | optional |
per_page | integer | optional |
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
| Field | Type | Required |
|---|---|---|
name | string | required |
amount | numeric | required |
currency | string | required |
billing_cycle | string | required |
next_billing_date | date | required |
description | string | optional |
category | string | optional |
notify_days_before | integer | optional |
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
| Param | Type | Description |
|---|---|---|
id | integer | Subscription ID |
PUT
/api/v1/subscriptions/{id}
Update a subscription
Protected
▼
Request Body
Same fields as Create — all optional.
| Field | Type | Required |
|---|---|---|
name | string | optional |
amount | numeric | optional |
currency | string | optional |
billing_cycle | string | optional |
next_billing_date | date | optional |
description | string | optional |
category | string | optional |
notify_days_before | integer | optional |
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
| Param | Type | |
|---|---|---|
days | integer | optional (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
| Param | Type | |
|---|---|---|
page | integer | optional |
per_page | integer | optional |
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"