---
title: "Publish Workstream Changes"
method: POST
path: "/api/v1/work-streams/{work_stream_id}/publish-changes"
tags: ["v1", "Work Streams", "work-streams"]
---

# Publish Workstream Changes

`POST /api/v1/work-streams/{work_stream_id}/publish-changes`

## 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-streams/{work_stream_id}/publish-changes`
- Auth: none declared

Bulk publish staged changes from the workstream planner (Phase I).

Replaces N×M per-task API calls with one aggregated publish. Applies
removals → additions → task-deadlines → workstream-deadline → deploy/status
in a fixed order. Dispatches per-worker bulk notifications (Q5 resolution).

## Path parameters

- `work_stream_id` integer, required

## Request body

- WorkStreamPublishChanges: Bulk publish payload. All fields are optional — the endpoint applies whichever categories are present in a single request.
  - `assignments_added` AssignmentChange[]: Assignments to create (task_id × personnel_ids).
    - `task_id` integer, required: Task being assigned/unassigned
    - `personnel_ids` integer[], required: Personnel to add or remove (depending on which list this lives in)
  - `assignments_removed` AssignmentChange[]: Assignments to delete (task_id × personnel_ids).
    - `task_id` integer, required: Task being assigned/unassigned
    - `personnel_ids` integer[], required: Personnel to add or remove (depending on which list this lives in)
  - `deadlines_changed` DeadlineChange[]: Per-task deadline changes.
    - `task_id` integer, required: Task whose deadline is changing
    - `new_deadline` string, nullable: New deadline as ISO 8601 timestamp, or None to clear
  - `workstream_deadline` string, nullable: New workstream-level deadline as ISO 8601 timestamp (Q4 / Phase K).
  - `set_workstream_deadline` boolean: True if workstream_deadline should be applied (distinguishes 'leave as-is' from 'clear to null').
  - `instructions_changed` InstructionsChange[]: Per-task instructions HTML updates.
    - `task_id` integer, required: Task whose instructions changed
    - `integration_instructions_html` string: New HTML content from TipTap editor
  - `documents_changed` DocumentsChange[]: Per-task documents + links updates (full replacement arrays).
    - `task_id` integer, required: Task whose documents/links changed
    - `integration_documents` DocumentItem[]
      - `storage_path` string, nullable: S3 storage path for uploaded files
      - `file_id` integer, nullable: Linked project file (files.id)
      - `bucket` string, nullable: Bucket of a linked project file
      - `label` string, nullable: Display label
    - `integration_links` LinkItem[]
      - `url` string, required: URL
      - `label` string, nullable: Display label
  - `field_edits` FieldEdit[]: Per-task field edits (start_date, shop_hours, description).
    - `task_id` integer, required: Task to edit
    - `title` string, nullable: New task title
    - `start_date` string, nullable: New start date (ISO) or empty to clear
    - `shop_hours` number, nullable: New shop hours
    - `description` string, nullable: New description text
  - `deploy` boolean: If true, transition the workstream from plan → deploy after other changes apply.
  - `set_status` string, nullable: New workstream status (e.g. 'blocked', 'on_hold', 'active', 'in_progress', 'completed').

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[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)
