---
title: "Delete a session"
method: DELETE
path: "/v1/sessions/{sessionId}"
tags: ["Sessions"]
---

# Delete a session

`DELETE /v1/sessions/{sessionId}`

## Request

- Base URL: `https://api.ironfang.com/analytics`
- URL: `https://api.ironfang.com/analytics/v1/sessions/{sessionId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Erases the session: its recordings' stored batches, then the session with its pages, events, recordings, IP address, user agent and every other detail. Recordings already counted stay counted. Needs analytics.sessions.delete.

## Response `204`

Session deleted

## Other responses

- `401`: No credential, an invalid one, an expired partner integration key, or a delegated token where none is accepted (`unauthorized`, `invalid_api_key`, `api_key_expired`, `delegated_not_allowed`).
- `403`: The credential lacks the permission or scope, names another organisation, or belongs to a partner integration that is not active (`forbidden`, `insufficient_scope`, `integration_inactive`).
- `404`: No such object in this organisation (`not_found`).
- `503`: This deployment cannot delete sessions yet (`deletion_unavailable`).

---

[API](https://skmtc.dev/ironfang/apis/ironfang-analytics-api.md) · [All operations](https://skmtc.dev/ironfang/apis/ironfang-analytics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ironfang/apis/ironfang-analytics-api/revisions/08197080c3d7?raw)
