Base URL:
Authentication: Most endpoints require a Bearer token in the Authorization header.
https://pomodoro.zidbit.comAuthentication: Most endpoints require a Bearer token in the Authorization header.
GET
/health
Health check endpoint to verify the server is running.
Response
{
"status": "ok",
"timestamp": "2024-01-01T12:00:00.000Z"
}
GET
/config.json
Returns server configuration including authentication URLs and client settings.
Response
{
"SERVER_URL": "https://pomodoro.zidbit.com",
"AUTH_URL_BASE": "https://auth.zidbit.com",
"AUTH_PROFILE_URL": "https://auth.zidbit.com/me",
"AUTH_CALLBACK_URL": "https://auth.zidbit.com/google/callback",
"GOOGLE_CLIENT_ID": "921307841938-gk0jclpdc4sa4017q8orendjagmhidla.apps.googleusercontent.com",
"featureFlag": true
}
POST
/auth/signout
Logs a user sign-out event.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Optional | User's email address | |
| userId | string | Optional | User's ID |
Response
{
"message": "Signed out successfully"
}
GET
/user-data
Retrieves user's pomodoro data from the server.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Required | User ID |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer token (format: "Bearer <token>") |
Response
{
"message": "success",
"data": {
// User's pomodoro data
}
}
POST
/user-data/sync
Synchronizes user's pomodoro data to the server.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string | Required | User ID |
| data | object | Required | User's pomodoro data to sync |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer token (format: "Bearer <token>") |
Response
{
"message": "Data synced successfully",
"result": {
// Sync result
}
}
GET
/user-statistics
Retrieves user statistics including streak, total hours, days accessed, and task statistics. This endpoint also calculates and persists the latest statistics.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Required | User ID |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Required | Bearer token (format: "Bearer <token>") |
Response
{
"message": "success",
"logs": [
{
"id": "session-id",
"completed": true,
"mode": "pomodoro",
"time": 1500,
"timestamp": "2024-01-01T12:00:00.000Z"
}
],
"statistics": {
"streak": 5,
"days_access": 10,
"total_hours": 12.5,
"task_stats": {
"totalTasks": 20,
"completedTasks": 15,
"totalPomodorosEstimated": 40,
"totalPomodorosCompleted": 30,
"completionRate": 75
}
}
}
Note: All endpoints that require authentication use Bearer token authentication.
Include the token in the Authorization header as:
Authorization: Bearer <your-token>