---
title: "Get Paperform deletion banner state for a cohort"
method: GET
path: "/cohorts/{cohortId}/paperform-deletions"
tags: ["PaperformDeletions"]
---

# Get Paperform deletion banner state for a cohort

`GET /cohorts/{cohortId}/paperform-deletions`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/cohorts/{cohortId}/paperform-deletions`
- Auth: HTTP bearer

Returns the banner state for the cohort Participants tab. Surfaces
form_submissions that the daily sweep has soft-deleted within the last
7 days, excluding rows classified as routine test-submission cleanup
(submission lived less than 24 hours and was never processed).

`shouldShow` is true when there are matching deletions AND at least one
of them is newer than the user's last dismissal for this cohort.

## Path parameters

- `cohortId` string, uuid, required

## Response `200`

Banner state retrieved successfully

- object
  - `success` boolean
  - `data` PaperformDeletionsBannerState
    - `shouldShow` boolean
    - `totalCount` integer
    - `countsByFormType` object[]
      - `form_type` string
      - `count` integer
    - `deletions` PaperformDeletionDetail[]
      - `id` string, uuid
      - `form_type` string
      - `participant_name` string, nullable
      - `submitted_at` string, date-time
      - `deleted_from_paperform_at` string, date-time
    - `newestDeletionAt` string, date-time, nullable
    - `windowDays` integer

## Other responses

- `401`: Unauthorized
- `404`: Cohort not found
- `422`: Validation failed (invalid cohort ID)
- `500`: Internal server error

---

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