Documents

Edit live content

PATCH
/documents/{document_id}/content

Change a live document's content and fan the change out to everyone currently editing it. Markdown documents take 'content'; sheets take 'cells' and/or 'row_order'; live databases are rejected — mutate them with the documents.database_row_* operations. Pass expected_content_hash from documents.live_read to be rejected with live_edit_conflict instead of overwriting a concurrent change. Browser keystrokes reach the server with up to ~2s delay, so they can be invisible to the hash check; the CRDT still merges them conflict-free.

Authorization

bearerApiKey
AuthorizationBearer <token>

Create a scoped API key in the Adlass settings.

In: header

Path Parameters

document_id*string

Resource identifier: document_id.

Formatuuid

Header Parameters

X-Request-Id?string

Optional correlation identifier.

Lengthlength <= 128
Idempotency-Key*string

A unique key for this intended write. Reuse it only for an identical retry.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PATCH "https://example.com/documents/123e4567-e89b-42d3-a456-426614174000/content" \  -H "Idempotency-Key: 123e4567-e89b-42d3-a456-426614174000" \  -H "Content-Type: application/json" \  -d '{}'
{  "document_id": "123e4567-e89b-42d3-a456-426614174000",  "content_hash": "3f786850e387550fdab836ed7e6dc881de23001b",  "changed": false}