---
title: "End a session"
method: DELETE
path: "/api/messaging/sessions/{sessionId}"
tags: ["messaging"]
---

# End a session

`DELETE /api/messaging/sessions/{sessionId}`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/sessions/{sessionId}`
- Auth: none declared

End an active session and optionally archive its data

## Path parameters

- `sessionId` string, required

## Response `200`

Session ended successfully

- object
  - `message` string

## Other responses

- `404`: Session not found
- `500`: Internal server error

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
