Add a document
POST
/api/v1/documents
const url = 'https://deck.example.com/api/v1/documents';const options = { method: 'POST', headers: {cookie: 'qd_auth=<qd_auth>', 'Content-Type': 'application/json'}, body: '{"kind":"work","name":"Work","slug":"work","tab":"Work","writer_node":"laptop","writer_tab":"overseer"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://deck.example.com/api/v1/documents \ --header 'Content-Type: application/json' \ --cookie qd_auth=<qd_auth> \ --data '{ "kind": "work", "name": "Work", "slug": "work", "tab": "Work", "writer_node": "laptop", "writer_tab": "overseer" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A new document (Settings, or POST /documents).
Media typeapplication/json
A new document (Settings, or POST /documents).
object
kind
required
name
required
string
position
integer | null format: int64
slug
required
string
tab
required
string
writer_node
The agent that writes it (both or neither).
string | null
writer_tab
string | null
key
additional properties
Example
{ "kind": "work", "name": "Work", "slug": "work", "tab": "Work", "writer_node": "laptop", "writer_tab": "overseer"}Responses
Section titled “Responses”Media typeapplication/json
object
id
required
integer format: int64
kind
required
name
required
What the person calls it, shown as its sub-tab: free text.
string
position
required
Its order among the documents, lowest first; top-level tabs follow their first document.
integer format: int64
slug
required
Its name in URLs and ?doc=: inbox, work, docspring.
string
tab
required
The top-level tab it sits under: free text (“Inbox”, “Work”).
string
writer_node
The agent that writes it: an agent’s report commands go to the document it writes. None: any agent may (the Inbox, as before documents).
string | null
writer_tab
string | null
Example
{ "kind": "inbox"}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}