---
title: "Assign topic to session number"
method: PUT
path: "/cohorts/{id}/session-topics/{sessionNumber}"
tags: ["Cohorts"]
---

# Assign topic to session number

`PUT /cohorts/{id}/session-topics/{sessionNumber}`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{id}/session-topics/{sessionNumber}`
- Auth: HTTP bearer

Assign or update the topic for a session number (zero state, before groups exist)

## Path parameters

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

## Request body

- object
  - `topic_id` string, uuid, required: ID of the topic to assign
  - `display_name` string, nullable: Optional participant-facing label override (MED-832). When set, participants see this string in place of the canonical topics.name. Internal/CM surfaces and reporting always continue to use topics.name. Empty string is normalized to NULL on the server (treated as "no override").

## Response `200`

Topic assigned successfully

- object
  - `success` boolean
  - `data` CohortSessionTopic
    - `id` string, uuid
    - `cohort_id` string, uuid
    - `session_number` integer: Session number (1-based)
    - `topic_id` string, uuid
    - `topic_name` string: Canonical topic name (used by CM-facing UI and reporting)
    - `display_name` string, nullable: Optional participant-facing label override (MED-832). When set, participants see this in place of topic_name; CM surfaces and reporting always use topic_name.
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Invalid session number
- `401`: Unauthorized
- `404`: Cohort or topic 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)
