---
title: "Delete User Session"
method: DELETE
path: "/api/v1/user-sessions/{user_session_id}"
tags: ["user_sessions"]
---

# Delete User Session

`DELETE /api/v1/user-sessions/{user_session_id}`

Soft delete a user session by setting its status to DELETED.

After the database delete completes, a best-effort RPC is sent to the
daemon to terminate any running session process. The delete always
succeeds regardless of daemon state.

Args:
    delete_worktree: If true, also delete the git worktree associated
        with this session on the user's machine.

Returns:
    204 No Content on success
    404 if session not found or already deleted

## Path parameters

- `user_session_id` string, required

## Query parameters

- `delete_worktree` boolean — If true, also delete the git worktree associated with this session.

## Response `204`

Successful Response

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omnara/apis/omnara-api.md) · [All operations](https://skmtc.dev/omnara/apis/omnara-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omnara/omnara-api/revisions/624048e40cad/schema)
