Files
pocketpaw/docs/api/delete-session.mdx
Rohit Kushwaha 4bb7313829 feat: move docs into monorepo, add deploy workflow
Consolidate documentation from the separate pocketpaw-web repo into the
main pocketpaw repo. This keeps docs and code in sync so PRs can update
both atomically.

- Remove docs/ from .gitignore
- Remove docs' own .git (was pocketpaw/pocketpaw-web)
- Add .github/workflows/deploy-docs.yml (builds from docs/ subdirectory)
- Track all 120+ MDX pages, config, landing page, and public assets

The separate pocketpaw-web repo can now be archived.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:12:04 +05:30

80 lines
1.9 KiB
Plaintext

---
title: Delete Session
description: "Permanently delete a PocketPaw chat session and all its associated messages. This action is irreversible and removes the session from the index and storage."
api: DELETE /api/sessions/{session_id}
baseUrl: http://localhost:8000
layout: '@/layouts/APIEndpointLayout.astro'
auth: bearer
section: API Reference
ogType: article
keywords: ["delete session", "remove conversation", "permanent delete"]
tags: ["api", "sessions"]
---
## Overview
Permanently deletes a session and all its associated messages from the file store. This action cannot be undone.
## Parameters
<ParamTable type="path">
<Param name="session_id" type="string" required>
The unique identifier of the session to delete.
</Param>
</ParamTable>
## Response
<ResponseField name="status" type="string">
`"ok"` on successful deletion.
</ResponseField>
<RequestExample>
<Tabs items={["cURL", "JavaScript", "Python"]}>
<Tab title="cURL">
```bash
curl -X DELETE "http://localhost:8000/api/sessions/session_abc123" \
-H "Authorization: Bearer <token>"
```
</Tab>
<Tab title="JavaScript">
```javascript
const sessionId = "session_abc123";
const response = await fetch(`http://localhost:8000/api/sessions/${sessionId}`, {
method: "DELETE",
headers: { "Authorization": "Bearer <token>" }
});
const data = await response.json();
console.log(data);
```
</Tab>
<Tab title="Python">
```python
import requests
session_id = "session_abc123"
response = requests.delete(
f"http://localhost:8000/api/sessions/{session_id}",
headers={"Authorization": "Bearer <token>"},
)
print(response.json())
```
</Tab>
</Tabs>
</RequestExample>
<ResponseExample>
<Tabs items={["200", "404"]}>
<Tab title="200">
```json
{ "status": "ok" }
```
</Tab>
<Tab title="404">
```json
{ "detail": "Session not found" }
```
</Tab>
</Tabs>
</ResponseExample>