Create a Notebook Block
Append a text or query block to an active investigation, using notebookVersion for concurrency. A producer sends key and revision instead to write its text block: the same key updates the block, overwriting user edits and bringing back a deleted block, and a block with a newer revision returns 409. Returns 201 with the new block, or 200 when a producer's write updates one; fetch investigation details for the updated notebook version. Requires a user or service account; key and revision require a service account or Seer agent token. Requires the organizations:investigations feature and open organization membership.
Path Parameters
organization_id_or_slug(string)REQUIREDThe ID or slug of the organization the resource belongs to.
notebook_id(string)REQUIREDThe ID of an investigation in this organization.
Body Parameters
kind(string)REQUIREDBlock kind: text for Markdown or query for an agent-generated data query. A producer's block must be text.
text- Textquery- Query
notebookVersion(integer)Current notebook version from the latest detail response. Stale versions return 409. Send this, or key and revision.
key(string)The producer's stable key for the block. Writing the same key again updates the block, even if a user edited or deleted it. Send with revision instead of notebookVersion. Only service accounts and Seer agents can send it.
revision(integer)The producer's revision for the block. A block with a newer revision returns 409, and a write can raise it by at most 100.
position(integer)Index among the notebook's blocks where a producer's block goes. Later blocks shift down, and a larger index puts it last. A new block goes last when omitted, and an existing block stays put.
title(string)Block title. May be empty.
content(string)Markdown content. May be empty, except in a producer's block.
generationPrompt(string)Instructions used when executing the block. May be empty.
config(object)Block configuration object. Nested keys are preserved.
display(object)Display settings. Text uses type markdown; query uses table, line, bar, or area. Versioned settings use version 1. Charts require xAxis and non-empty yAxes. Defaults to Markdown for text and table for query.
Scopes
<auth_token> requires one of the following scopes:org:adminorg:readorg:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/notebooks/{notebook_id}/blocks/ \ -H 'Authorization: Bearer <auth_token>' \ -H 'Content-Type: application/json' \ -d '{}'
Copied{ "id": "12", "position": 0, "kind": "text", "title": "Summary", "content": "Checkout latency rose after the 2.4.0 release.", "generationPrompt": "", "generatedContent": "Checkout latency rose after the 2.4.0 release.", "output": { "schemaVersion": 1, "markdown": "Checkout latency rose after the 2.4.0 release." }, "outputStatus": "available", "currentExecution": { "id": "40", "status": "completed", "executor": "code_mode", "schemaVersion": 1, "startedAt": "2026-11-10T18:00:00.000000Z", "completedAt": "2026-11-10T18:00:00.000000Z", "error": null }, "config": {}, "display": { "type": "markdown" }, "dependencies": [], "parameterKeys": [], "version": 1, "staleAt": null, "createdBy": null, "lastEditedBy": null, "producerKey": "summary", "producerRevision": 1 }