Skip to main content

Create a doc

Create a doc.

Parameters

title
string
Title of the doc.
visibility
enum
required
Visibility of the doc. One of private, internal, shared.
role
enum
Only when visibility is internal. Used as the default role for all team members. If a user has a directly attached role, it will override this one. One of document_admin, document_manager, document_editor, document_viewer.
folder
string
Unique identifier for the folder in which the doc will be created.

Returns

Returns the created doc object. Throws an error if some parameters are not valid.

post
/api/docs
curl -X POST https://{workspace}.kitchen.co/api/docs \
-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",
"updated_at": "2024-03-12T10:11:23+00:00",
"visibility": "internal"
}