---
title: "Create Scoped Work Session"
method: POST
path: "/api/v1/work-sessions"
tags: ["v1", "Task Time", "task-time"]
---

# Create Scoped Work Session

`POST /api/v1/work-sessions`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/work-sessions`
- Auth: none declared

Backfill a project or work-stream session with explicit timestamps.

The scoped twin of POST /tasks/{task_id}/time-entries, and the only way
labour that was never clocked live can reach a project's P&L. Omit
clock_out_at to leave the session open.

## Request body

- ScopedWorkSessionCreate: Body for POST /work-sessions: backfill a project or work-stream session. The scoped twin of ``TaskTimeEntryCreate``. ``scope`` is constrained to the two non-task values here rather than checked in the service, so a bad value is a 422 naming the field instead of a sentence about an unsupported scope. Omit ``clock_out_at`` to leave the session open, same as the task route.
  - `scope` 'work_stream' | 'project', required: What the hours are attributed to: work_stream or project
  - `scope_id` integer, required: Work stream ID or project ID
  - `personnel_id` integer, required: Personnel ID to log time for
  - `clock_in_at` string, required: ISO-8601 clock-in timestamp
  - `clock_out_at` string, nullable: ISO-8601 clock-out timestamp; omit to leave the session open

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-18** `02b3f0a3ecbb`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/changes/api/v1/work-sessions/post.md)

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
