openapi: 3.1.0 info: title: Api version: 0.1.0 description: API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: Auth description: Browser and mobile authentication endpoints. - name: reminders description: Reminders CRUD endpoints. paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /auth/user: get: tags: [Auth] operationId: getCurrentAuthUser summary: Get the currently authenticated user parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - $ref: '#/components/parameters/SessionCookie' responses: '200': description: Auth status resolved successfully. content: application/json: schema: $ref: '#/components/schemas/AuthUserEnvelope' /login: get: tags: [Auth] operationId: beginBrowserLogin summary: Start the browser OIDC login flow parameters: - name: returnTo in: query required: false schema: type: string responses: '302': description: Redirect to the OIDC authorization endpoint. /callback: get: tags: [Auth] operationId: handleBrowserLoginCallback summary: Complete the browser OIDC login flow parameters: - name: code in: query required: false schema: type: string - name: state in: query required: false schema: type: string - name: iss in: query required: false schema: type: string format: uri responses: '302': description: Redirect to the returnTo path on success. /logout: get: tags: [Auth] operationId: logoutBrowserSession summary: Clear the session and begin OIDC logout parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - $ref: '#/components/parameters/SessionCookie' responses: '302': description: Redirect to the OIDC provider logout URL. /mobile-auth/token-exchange: post: tags: [Auth] operationId: exchangeMobileAuthorizationCode summary: Exchange a mobile OIDC code for a session token requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/MobileTokenExchangeRequest' responses: '200': description: Session created successfully. content: application/json: schema: $ref: '#/components/schemas/MobileTokenExchangeSuccess' '400': description: Missing or invalid required fields. content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' '500': description: Token exchange failed. content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' /mobile-auth/logout: post: tags: [Auth] operationId: logoutMobileSession summary: Delete a mobile session token parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' responses: '200': description: Logout processed. content: application/json: schema: $ref: '#/components/schemas/LogoutSuccess' /reminders: get: tags: [reminders] operationId: listReminders summary: List all reminders for the authenticated user parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' responses: '200': description: List of reminders content: application/json: schema: $ref: '#/components/schemas/RemindersListResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' post: tags: [reminders] operationId: createReminder summary: Create a new reminder parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateReminderRequest' responses: '201': description: Created reminder content: application/json: schema: $ref: '#/components/schemas/ReminderResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' /reminders/{id}: put: tags: [reminders] operationId: updateReminder summary: Update a reminder parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateReminderRequest' responses: '200': description: Updated reminder content: application/json: schema: $ref: '#/components/schemas/ReminderResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' '404': description: Not found content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' delete: tags: [reminders] operationId: deleteReminder summary: Delete a reminder parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' - name: id in: path required: true schema: type: string responses: '200': description: Deleted successfully content: application/json: schema: $ref: '#/components/schemas/DeleteSuccess' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' /reminders/sync: post: tags: [reminders] operationId: syncReminders summary: Bulk sync local reminders to server parameters: - $ref: '#/components/parameters/AuthorizationSessionHeader' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SyncRemindersRequest' responses: '200': description: Synced reminders content: application/json: schema: $ref: '#/components/schemas/RemindersListResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ErrorEnvelope' components: parameters: AuthorizationSessionHeader: name: Authorization in: header required: false description: Opaque session token — Bearer . schema: type: string SessionCookie: name: sid in: cookie required: false description: Browser session cookie. schema: type: string schemas: HealthStatus: type: object properties: status: type: string required: - status AuthUser: type: object required: [id, email, firstName, lastName, profileImageUrl] properties: id: type: string email: type: [string, 'null'] format: email firstName: type: [string, 'null'] lastName: type: [string, 'null'] profileImageUrl: type: [string, 'null'] AuthUserEnvelope: type: object required: [user] properties: user: oneOf: - $ref: '#/components/schemas/AuthUser' - type: 'null' MobileTokenExchangeRequest: type: object required: [code, code_verifier, redirect_uri, state] properties: code: type: string minLength: 1 code_verifier: type: string minLength: 1 redirect_uri: type: string minLength: 1 format: uri state: type: string minLength: 1 nonce: type: string minLength: 1 MobileTokenExchangeSuccess: type: object required: [token] properties: token: type: string LogoutSuccess: type: object required: [success] properties: success: type: boolean const: true ErrorEnvelope: type: object required: [error] properties: error: type: string ReminderItem: type: object required: [id, title, notes, dateTime, isCompleted, priority, category, repeatInterval, isSnoozed, createdAt, updatedAt] properties: id: type: string title: type: string notes: type: string dateTime: type: string format: date-time isCompleted: type: boolean priority: type: string enum: [low, medium, high] category: type: string enum: [personal, work, health, study, other] repeatInterval: type: string enum: [none, daily, weekly, monthly, yearly] isSnoozed: type: boolean snoozeUntil: type: [string, 'null'] format: date-time notificationId: type: [string, 'null'] createdAt: type: string format: date-time updatedAt: type: string format: date-time RemindersListResponse: type: object required: [reminders] properties: reminders: type: array items: $ref: '#/components/schemas/ReminderItem' ReminderResponse: type: object required: [reminder] properties: reminder: $ref: '#/components/schemas/ReminderItem' CreateReminderRequest: type: object required: [id, title, dateTime, priority, category, repeatInterval] properties: id: type: string title: type: string notes: type: string dateTime: type: string format: date-time priority: type: string enum: [low, medium, high] category: type: string enum: [personal, work, health, study, other] repeatInterval: type: string enum: [none, daily, weekly, monthly, yearly] isSnoozed: type: boolean snoozeUntil: type: [string, 'null'] format: date-time isCompleted: type: boolean UpdateReminderRequest: type: object properties: title: type: string notes: type: string dateTime: type: string format: date-time isCompleted: type: boolean priority: type: string enum: [low, medium, high] category: type: string enum: [personal, work, health, study, other] repeatInterval: type: string enum: [none, daily, weekly, monthly, yearly] isSnoozed: type: boolean snoozeUntil: type: [string, 'null'] format: date-time SyncRemindersRequest: type: object required: [reminders] properties: reminders: type: array items: $ref: '#/components/schemas/CreateReminderRequest' DeleteSuccess: type: object required: [success] properties: success: type: boolean