---
title: "Finalize sessions and prepare invites"
method: POST
path: "/cohorts/{cohortId}/sessions/finalize"
tags: ["Sessions"]
---

# Finalize sessions and prepare invites

`POST /cohorts/{cohortId}/sessions/finalize`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{cohortId}/sessions/finalize`
- Auth: none declared

Marks sessions as finalized, persists the optional video link and
physical location, and creates attendance records for RSVP tracking.

MED-780: `video_link` is now optional and may be empty (e.g., for
partner-room sessions where there's no Zoom link). The optional
`location` field is free-text physical address shown on the
calendar invite. When both are present, `location` wins as the
calendar event's location and the video link goes in the description.

## Path parameters

- `cohortId` string, uuid, required

## Request body

- object
  - `group_ids` string[]: Optional - specific groups to finalize. If empty, finalizes all unfinalized groups.
  - `video_link` string, nullable: Optional video conferencing link for the sessions. Empty/whitespace is treated as "no link".
  - `location` string, nullable: Optional free-text physical location (e.g., "Room 204, 123 Main St"). When set, becomes the calendar event's `location` field; the video link, if present, appears in the event description.

## Response `200`

Sessions finalized

- object
  - `finalized_count` integer
  - `attendance_records_created` integer
  - `groups_finalized` string[]

## Other responses

- `400`: Bad request - no sessions to finalize
- `401`: Unauthorized
- `404`: Cohort not found

---

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