Skip to main content

Update page

POST 

/wiki/pages/:pageID

Update page.

content rules

For collaboration pages whose refType is collaboration:

  • The content field in the request body is a string, but its value must be JSON that conforms to the Wiz collaboration document structure. Do not pass plain text directly.
  • The top-level document structure must contain at least blocks, comments, and meta, for example {"blocks": [...], "comments": {}, "meta": {}}. See Document Data Structure for detailed Block and container rules.
  • When updating an existing page, get the page details first, parse the returned content, modify the existing document object, and then serialize it again. This avoids losing unchanged data such as table cells, code block containers, and comments.
  • Before calling this API, serialize the document object to a string and use that string as the content field in the request body.

Request body example:

{
"content": "{\"blocks\":[{\"id\":\"A12345678\",\"type\":\"text\",\"text\":[{\"insert\":\"Updated content\"}]}],\"comments\":{},\"meta\":{}}"
}

If content includes resources, attachments, or cards, call related APIs first and then write returned IDs or card info into content before updating.

Recommended sequence:

  1. Upload resources by POST /wiki/pages/{pageID}/resources.
  2. Upload attachments by POST /wiki/pages/{pageID}/attachments.
  3. Create cards by POST /wiki/pages/{pageID}/cards if needed.
  4. Call this API with final content.

Request

Path Parameters

    pageID stringrequired

    The page ID

Query Parameters

    teamID stringrequired

    The team ID

    requestUserID string

    User ID, this parameter can only be passed when calling as an Oauth bot. It is used to perform operations as the specified user

Body

required

At least one of title or content must be provided; they cannot both be empty.

    title string

    The page title

    content string

    The page content. For collaboration pages, this must be a JSON string that conforms to the Wiz collaboration document structure, not plain text. The top-level document structure must contain at least blocks, comments, and meta. See Document Data Structure for details.

Responses

Request is successful.

Schema

    result string

    The result of this request.

    errorCode string

    The error code of this request.

    errorMsg string

    Error message for this request.

    errorData object

    Error meta data for this request.

Loading...