---
title: "Interrupt active runs for a notebook in an interactive session"
method: POST
path: "/sessions/{sessionId}/interrupt"
tags: ["Sessions"]
---

# Interrupt active runs for a notebook in an interactive session

`POST /sessions/{sessionId}/interrupt`

Interrupts active runs for the given notebook in an interactive session and signals the notebook kernel to stop any in-flight code, including arbitrary code submitted via `/sessions/{sessionId}/execute`. Other notebooks in the same session keep running, so the session may remain `busy`. Returns the refreshed session state.

## Path parameters

- `sessionId` string, uuid, required — Session identifier.

## Request body

- object
  - `notebookId` string, required — Notebook to interrupt within the session. Use the session's source notebook ID (`session.notebookId`), not `sessionNotebookId`.

## Response `200`

Session state after the interrupt.

- InterruptSessionResponse
  - `session` Session, required
    - `id` string, uuid, required — Session identifier. Use this as the sessionId in subsequent operations.
    - `status` 'idle' | 'busy' | 'terminated', required — `busy` while a run is pending or running, `idle` when no runs are active, `terminated` once the session has ended.
    - `projectId` string, uuid, required — ID of the project the session was created in.
    - `notebookId` string, required — ID of the notebook the session was created from.
    - `sessionNotebookId` string, required — ID of the session's own editable copy of the notebook. The session executes this copy, not the source notebook. Use the standard notebook and block endpoints against this ID to read and edit what the session runs; changes never affect the source notebook and are discarded when the session ends. Each run persists as a run snapshot.
    - `currentRunId` string, uuid, nullable, required — ID of the active (pending or running) run in this session, or null when idle.
    - `createdAt` string, date-time, required
    - `lastActivityAt` string, date-time, required — Timestamp of the most recent submission to the session. Refreshed on every new run.
    - `expiresAt` string, date-time, required — When the session will end if no further submissions are made.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — Insufficient permissions
- `404` — Session or notebook not found
- `409` — Project is suspended
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/deepnote/apis/deepnote-public-api.md) · [All operations](https://skmtc.net/deepnote/apis/deepnote-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepnote/deepnote-public-api/revisions/726970fd2992/schema)
