work-sessions

Move concluded work sessions (hours) to another project, across workspaces.

The one way priced hours leave the workspace they were earned in. Who loses money decides: an owner/admin of the origin moves at once; the hours’ owner moves at once from their own personal workspace or within one workspace; a plain member taking hours OUT of a company workspace gets 202 — the move is recorded as a request (request_id) and the origin’s owner/admins decide (POST /work-sessions/move/requests/{id}/decide). The destination must be a project the hours’ owner can track time in. A moved session is re-priced with the destination’s rates in the same statement, its task kept only when it belongs to the destination project, and the origin’s money history records it (an Undo is a move back). Call POST /work-sessions/move/preview first to show the price before and after.

post/work-sessions/move

Request

  • Base URL: https://restivity.ai/api/v1
  • URL: https://restivity.ai/api/v1/work-sessions/move
  • 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

session_idsstring[] required

The ids of the concluded work sessions to move (1–500) — one person’s, from one workspace.

destination_project_idstring uuid required

The project the hours go to; they are priced again with the rates of its workspace.

notestring

Optional: why the hours move — shown to whoever approves the request.

Response

The hours moved: each session’s anchors and price before and after.

status'moved' | 'pending' | 'declined' | 'undone' required
code'move_needs_approval'

On 202: the move waits for the owner/admins of the workspace the hours leave.

messagestring
request_idstring uuid nullable required
origin_workspace_idstring uuid required
destination_workspace_idstring uuid required
approver_idsstring[]
session_idsstring[]

Changes

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