---
title: "Start a by-number session's content from an existing session (MED-1110)"
method: POST
path: "/cohorts/{cohortId}/sessions/by-number/{sessionNumber}/agenda/duplicate-from"
tags: ["Session Agenda Authoring"]
---

# Start a by-number session's content from an existing session (MED-1110)

`POST /cohorts/{cohortId}/sessions/by-number/{sessionNumber}/agenda/duplicate-from`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{cohortId}/sessions/by-number/{sessionNumber}/agenda/duplicate-from`
- Auth: none declared

Session-number-addressed sibling of
`/cohorts/{cohortId}/sessions/{sessionId}/agenda/duplicate-from`, for the
pre-groups Build Content entry point (MED-1086 / E1.3m). Copies the
source session's authored content — description, agenda sections
(including leader prompts, with commitment toggles reconciled against the
target cohort's `commitment_tracking_enabled`), and participant
pre-session work — and returns it for the editor's draft state.

Unlike the sessionId variant, NO slide deck is copied: the deck copy is
sessionId-bound (its S3 key path embeds a concrete session id) and the
deck upload slot is hidden pre-groups, so `slide_deck_file` is always
null. The agenda content is NOT persisted — the by-number Save endpoint
(`POST .../by-number/{sessionNumber}/agenda`) is the only write path.

## Path parameters

- `cohortId` string, uuid, required
- `sessionNumber` integer, required

## Request body

- object
  - `source_session_id` string, uuid, required: A session id from the source cohort (any group's row at the source session_number — the service resolves to the canonical scope).

## Response `200`

Reconciled content payload. The editor loads `sections` / `description` / `participant_pre_session_work` into draft state. `slide_deck_file` is always null in by-number mode.

- object
  - `success` boolean
  - `data` object
    - `description` string, nullable
    - `sections` SessionAgendaSection[]
      - `id` string, uuid: Present on existing rows being kept on save; absent on new ones.
      - `section_name` string, nullable
      - `duration_minutes` integer, nullable: MED-1224 — section duration in whole minutes. Minimum valid value is 1; 0 and negatives are rejected. Nullable so an in-progress section with no duration yet can still be saved (AC-MC3).
      - `sort_order` integer, required: 1-based position in the agenda list.
      - `participant_prompt` string, nullable: MED-980 (E1.3e / AC-PP). Rich-text instructions shown to participants in-session, stored as sanitized HTML. Optional. Rendering to participants is E3.3a.
      - `show_commitment_field` boolean: MED-980 (E1.3e / AC-SCF). When true, the in-session participant view (E3.3a) surfaces the commitment-entry field in this section. UI gates the toggle on the cohort's commitment_tracking_enabled; the column persists regardless.
      - `show_last_session_commitment` boolean: MED-980 (E1.3e / AC-SLC). When true, the in-session participant view (E3.3a) displays the participant's prior-session commitment in this section. UI gates the toggle on the cohort's commitment_tracking_enabled.
      - `visuals` SessionAgendaVisual[], required
        - `slide_page` integer, required: 1-based page number in the uploaded slide deck PDF.
        - `sort_order` integer, required: 1-based display order within the section.
      - `leader_prompts` SessionAgendaLeaderPrompt[], required
        - `id` string, uuid: Present on existing rows being kept on save; absent on new ones.
        - `intro_text` string, nullable: Short single-line context above the discussion prompt.
        - `discussion_prompt` string, nullable: Rich-text HTML serialization (bold, italic, underline, bullet list).
        - `sort_order` integer, required: 1-based position in the section's prompt list (creation order).
    - `participant_pre_session_work` SessionAgendaPreSessionWork: MED-981 (E1.3f). Participant Pre-Session Work panel — configures what participants complete before the session. Pre-session page rendering is E3.1c (NOT this story).
      - `commitment_review_enabled` boolean, required: AC-CR1/CR3. When TRUE, the pre-session page (E3.1c) will surface the participant's prior-session commitment review. UI gates the toggle on cohort_commitment_tracking_enabled — hidden when off.
      - `reading_tasks` string, nullable, required: AC-RT1/RT2. Reading / Tasks rich-text (bold, italic, underline, bullet list). Sanitized server-side on write.
      - `reflection_prompts` SessionAgendaReflectionPrompt[], required
        - `id` string, uuid: Present on existing rows being kept on save; absent on new ones.
        - `prompt_text` string, nullable: Plain text — NOT rich text per the spec.
        - `sort_order` integer, required
    - `cohort_commitment_tracking_enabled` boolean
    - `slide_deck_file` object, nullable: Always null in by-number mode (no session instance to attach a deck to).

## Other responses

- `401`: Unauthorized
- `404`: Target (cohort/sessionNumber) not eligible, or source session not found / not eligible.
- `422`: Source has no authored content to copy.

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
