---
title: "Delete a stateful session"
method: DELETE
path: "/v1/proxy/packages/{package_id}/stateful-sessions/{session_id}"
tags: ["Stateful Sessions"]
---

# Delete a stateful session

`DELETE /v1/proxy/packages/{package_id}/stateful-sessions/{session_id}`

## Request

- Base URL: `https://api.platform.soax.com`
- URL: `https://api.platform.soax.com/v1/proxy/packages/{package_id}/stateful-sessions/{session_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/soax/apis/soax-api/docs/v1/proxy/packages/:package_id/stateful-sessions/:session_id/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete a session. It stops working immediately, and its name and port are freed for reuse.

Requires the `proxy:packages:write` scope.

## Path parameters

- `package_id` string, required: The ID of the proxy package (UUID format)
- `session_id` string, required: The ID of the stateful session (UUID format)

## Response `204`

Successful Response

## Other responses

- `401`: Missing, invalid, or revoked API key.
- `403`: The API key does not carry the scope this endpoint requires.
- `404`: Session not found, or outside the API key's package restriction.
- `422`: Validation Error
- `429`: Rate limit exceeded (5 requests/second per API key, 500 requests/minute per IP). The response includes `Retry-After` (seconds), `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (Unix time) headers — wait `Retry-After` seconds and retry.

---

[API](https://skmtc.dev/soax/apis/soax-api.md) - [All operations](https://skmtc.dev/soax/apis/soax-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soax/apis/soax-api/revisions/2abdaa934277?raw)
