---
title: "Update granular email settings for a cohort"
method: PUT
path: "/api/cohorts/{id}/email-settings"
tags: ["Cohorts"]
---

# Update granular email settings for a cohort

`PUT /api/cohorts/{id}/email-settings`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/cohorts/{id}/email-settings`
- Auth: none declared

Replaces the full email settings JSONB for the specified cohort. Supports 3-level cascading control - master, persona, and individual email type toggles.

## Path parameters

- `id` string, uuid, required

## Request body

- CohortEmailSettings
  - `master_enabled` boolean: Master kill switch for all cohort emails
  - `personas` object
    - `participants` PersonaEmailSettings
      - `enabled` boolean: Persona-level toggle
      - `emails` object: Individual email type toggles
    - `coaches` PersonaEmailSettings
      - `enabled` boolean: Persona-level toggle
      - `emails` object: Individual email type toggles
    - `partners` PersonaEmailSettings
      - `enabled` boolean: Persona-level toggle
      - `emails` object: Individual email type toggles

## Response `200`

Email settings updated successfully

- object
  - `success` boolean
  - `data` CohortEmailSettings
    - `master_enabled` boolean: Master kill switch for all cohort emails
    - `personas` object
      - `participants` PersonaEmailSettings
        - `enabled` boolean: Persona-level toggle
        - `emails` object: Individual email type toggles
      - `coaches` PersonaEmailSettings
        - `enabled` boolean: Persona-level toggle
        - `emails` object: Individual email type toggles
      - `partners` PersonaEmailSettings
        - `enabled` boolean: Persona-level toggle
        - `emails` object: Individual email type toggles

## Other responses

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