---
title: "Update a block"
method: PATCH
path: "/blocks/{blockId}"
tags: ["Blocks"]
---

# Update a block

`PATCH /blocks/{blockId}`

## Path parameters

- `blockId` string, required — Opaque block identifier.

## Request body

- object
  - `content` string — Updated block content.
  - `integrationId` string, uuid — Integration ID to store in sql block metadata as sql_integration_id.

## Response `200`

Block updated

- UpdateBlockResponse
  - `block` object, required
    - `id` string, required — Opaque block identifier.
    - `notebookId` string, required — Opaque notebook identifier.
    - `type` string, required
    - `content` string, required
    - `version` integer, required
    - `updatedAt` string, date-time, required
    - `integrationId` string, uuid, nullable, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Insufficient permissions to update the block
- `404` — Block not found, or integration does not exist in workspace
- `409` — Project is suspended, or block type conflicts with requested update
- `429` — Rate limit exceeded

---

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