Skip to main content

Update a doc

Updates the specified doc by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Parameters

title
string
Title of the doc.
body
string
The body of the doc.
visibility
enum
Visibility of the doc. One of private, internal, shared.

Returns

Returns the doc object if the update succeeded. Throws an error if update parameters are invalid.

put
/api/docs/{id}
curl -X PUT https://{workspace}.kitchen.co/api/docs/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"archived_at": null,
"body": [
"The doc body"
],
"clients_can_edit": false,
"created_at": "2024-03-12T10:11:23+00:00",
"id": "doc_36e7eeabce00ecd1f5e9387a",
"title": "The doc title",
"updated_at": "2024-03-12T10:11:23+00:00",
"visibility": "internal"
}