---
title: "Submit a run on an interactive session"
method: POST
path: "/sessions/{sessionId}/runs"
tags: ["Sessions"]
---

# Submit a run on an interactive session

`POST /sessions/{sessionId}/runs`

Runs a notebook, or specific blocks of it, in an existing interactive session. Only the session creator may submit runs. Submissions while the notebook is busy are accepted and queue on the session kernel; retrying a submit creates a new queued run.

## Path parameters

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

## Request body

- object
  - `notebookId` string, required — ID of the notebook to run within the session. Use the session's source notebook ID (`session.notebookId`), not `sessionNotebookId`.
  - `blockIds` string[] — Optional non-empty list of unique block IDs to run, in request order. Omit to run the whole notebook. Use session block IDs from the session's notebook copy (see `sessionNotebookId` on the session); source-notebook block IDs are rejected.
  - `inputs` object — Input values to use for this run, keyed by the input `name` returned from `GET /notebooks/{sessionNotebookId}` (the session's editable copy, which the run resolves inputs against). Values must match the referenced input block type.

## Response `202`

Run accepted

- CreateRunResponse
  - `runId` string, uuid, required
  - `status` 'pending' | 'running' | 'success' | 'error' | 'internal_error' | 'stopped', required
  - `createdAt` string, date-time, required

## 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)
