pomodoro

Create a Pomodoro session.

post/pomodoro

Request

  • Base URL: https://restivity.ai/api/v1
  • URL: https://restivity.ai/api/v1/pomodoro
  • Auth: OAuth 2 (authorization code, authorization URL https://restivity.ai/oauth/authorize, token URL https://restivity.ai/api/oauth/token, scopes: pomodoro:write)

Request body

task_idstring uuid nullable
project_idstring uuid nullable
start_timestring date-time

When the session started, ISO 8601 datetime with timezone offset. Omit to use the current server time (UTC).

durationinteger

Planned session duration in seconds: a work session 600–14400 (10 minutes to 4 hours), a break at most 86400. Stopping earlier is fine: the worked time is elapsed_time. Omit to inherit the user's configured pomodoro length (work / short-break / long-break) from their profile.

type'work' | 'short-break' | 'long-break'
notesstring
status'active' | 'completed'

active (default) starts a live timer. completed logs a finished session after the fact (backfill), with start_time and end_time; it leaves a running timer alone.

end_timestring date-time

When the session ended, ISO 8601 datetime with timezone offset. Required when status is completed; ignored for a live timer (the server plans it from duration).

elapsed_timeinteger

Actual seconds worked, for a completed backfill, at most 86400. Omit to derive it from end_time − start_time.

Response

The created Pomodoro session.

idstring uuid required
user_idstring uuid required
task_idstring uuid nullable required
project_idstring uuid nullable required
start_timestring required
end_timestring required
durationinteger required

Planned duration in seconds.

elapsed_timeinteger required

Actual elapsed time in seconds.

type'work' | 'short-break' | 'long-break' required
status'active' | 'paused' | 'completed' | 'interrupted' | 'abandoned' required
notesstring required
completion_notesstring nullable
interruptionsinteger required
created_atstring required
deleted_atstring nullable required
time_remaininginteger nullable

Seconds remaining when paused / interrupted; null otherwise.

resumed_atstring nullable
subtask_idsstring[] nullable
firestore_idstring nullable
workspace_idstring uuid nullable

Changes

No recorded changes to this operation across all 1 revision of this API.