---
title: "Run a project notebook"
method: POST
path: "/api/v1/project-rooms/{id}/notebooks/{notebookId}/runs"
tags: ["Projects"]
---

# Run a project notebook

`POST /api/v1/project-rooms/{id}/notebooks/{notebookId}/runs`

## Request

- Base URL: `https://askthegrid.com`
- URL: `https://askthegrid.com/api/v1/project-rooms/{id}/notebooks/{notebookId}/runs`
- Auth: HTTP bearer

Queues analysis using expected_revision and a UUID request_key. Reuse the request_key when retrying the same request; poll getProjectNotebookRun for completion.

## Path parameters

- `id` string, required
- `notebookId` string, uuid, required

## Request body

- object
  - `options` object, required
    - `expected_revision` integer, required
    - `request_key` string, uuid, required
    - `width` integer
    - `sample_rows` integer
    - `theme` 'light' | 'dark'

## Response `200`

Success

- object
  - `id` string, uuid, required
  - `revision` integer, required
  - `status` 'queued' | 'running' | 'succeeded' | 'failed' | 'cancelled' | 'timed_out', required
  - `created_at` string, date-time, required
  - `deadline` string, date-time, required
  - `finished_at` string, date-time, nullable, required

## Other responses

- `400`: The request did not match the contract.
- `401`: Missing or invalid credentials.
- `429`: Rate limit exceeded. Wait `Retry-After` seconds; `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` report the budget. Signed-in sessions and API keys have larger budgets than anonymous callers.

---

[API](https://skmtc.dev/askthegrid/apis/ask-the-grid-api.md) · [All operations](https://skmtc.dev/askthegrid/apis/ask-the-grid-api/llms.txt) · [OpenAPI document](https://skmtc.dev/askthegrid/apis/ask-the-grid-api/revisions/9cd80115e395?raw)
