---
title: "Discard Studio Opportunity"
method: POST
path: "/playground/opportunities/discard"
tags: ["AI_PLAYGROUND", "OPPORTUNITIES"]
---

# Discard Studio Opportunity

`POST /playground/opportunities/discard`

Reject an in-flight Studio opportunity DRAFT (AI-8316).

The mirror of submit: same feature gate, same service-user-only dependency,
same session-ownership check. It stamps the draft block on the turn so the
half-finished form stops re-rendering on every session load. It never
touches a published opportunity, so it needs no ClickHouse client — use
``DELETE /studio/opportunities`` to unpublish.

Idempotent: discarding a draft that is already gone still returns 200 with
``discarded: false``, so the client can say "nothing to reject" instead of
collapsing a still-live draft behind a terminal card.

## Query parameters

- `navigationSource` string, nullable

## Request body

- DiscardStudioOpportunityRequest — Body for ``POST /studio/opportunities/discard`` — the mirror of submit. Rejects an in-flight DRAFT so a half-finished opportunity stops persisting on the session. ``resource_name`` disambiguates when one turn emitted several drafts (one per resource); a turn holding a single draft resolves without it.
  - `session_id` string, required
  - `turn_uuid` string, nullable
  - `resource_name` string

## Response `200`

Successful Response

- DiscardStudioOpportunityResponse — ``{discarded, resource_name}`` for a discarded draft. Idempotent: discarding a draft that is already gone is not a failure — the client ends up in the state it asked for either way. ``discarded`` still distinguishes "a block was stamped" from "nothing matched", because collapsing the card to a terminal Rejected state on a no-match would strand a still-live draft behind a dead card.
  - `discarded` boolean
  - `resource_name` string

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-11** `70e0a3e5cb0d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/myaltimate/apis/fastapi/changes/playground/opportunities/discard/post.md)

---

[API](https://skmtc.dev/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.dev/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc.dev/myaltimate/apis/fastapi/revisions/4dfe86ff412c?raw)
