Skip to main content

Move a doc

Moves a doc to a specified folder. If the parent parameter is null, the doc will be moved to the root level.

Parameters

parent
nullable string
Unique identifier for the folder in which the doc will be moved. The folder must exist within the current workspace and must not be archived. If null, the doc will be moved to the root level.

Returns

Returns the updated doc object if the move succeeded. Throws an error if the folder does not exist or is archived.

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