---
title: "Delete Niche"
method: DELETE
path: "/sessions/niches"
tags: ["sessions"]
---

# Delete Niche

`DELETE /sessions/niches`

## Request

- Base URL: `https://api.nicheangle.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.nicheangle.com/sessions/niches`
- Auth: none declared

Delete all sessions for a given niche — A7: route EACH through
`_teardown_session` (cancel + settle-via-release + delete FK children in order),
not a raw `sa_delete(Session)`. The raw delete 500'd on any post-CP3 session
(outputs/story_picks/scheduled_posts FKs have no ON DELETE) and stranded held
credits on pre-CP3 ones (`credit_transactions.session_id` SET NULL → the open
reservation could never be reconstructed/released). Commit per session so one
bad row doesn't roll back the batch.

## Query parameters

- `niche` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/nicheangle/apis/signal-api.md) · [All operations](https://skmtc.dev/nicheangle/apis/signal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nicheangle/apis/signal-api/revisions/ed8b47ff5891?raw)
