---
title: "Terminate Session"
method: DELETE
path: "/v1/agents/sessions/{session_id}"
tags: ["Agent Sessions"]
---

# Terminate Session

`DELETE /v1/agents/sessions/{session_id}`

Terminate a session and kill its actor.

This permanently ends the session and releases all associated resources.

Args:
    request: FastAPI request with tenant context
    session_id: Session identifier

Returns:
    TerminateSessionResponse with termination timestamp

Raises:
    NotFoundError: If session not found

Example:
    ```bash
    curl -X DELETE http://localhost:8000/v1/agents/sessions/ses_abc123 \
      -H "Authorization: Bearer {api_key}" \
      -H "X-Namespace: {namespace_id}"
    ```

## Path parameters

- `session_id` string, required — Session ID

## Response `200`

Successful Response

- TerminateSessionResponse — Response for session termination. Attributes: session_id: Session identifier status: New session status (terminated) terminated_at: Termination timestamp
  - `session_id` string, required — Session identifier
  - `status` 'active' | 'idle' | 'archived' | 'terminated', required — Session lifecycle states. Attributes: ACTIVE: Session is actively processing messages IDLE: Session exists but no recent activity ARCHIVED: Session archived (read-only) TERMINATED: Session permanently closed
  - `terminated_at` string, date-time, required — Termination timestamp

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

[API](https://skmtc.net/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.net/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/versions/220a3b263fda/schema)
