documents

createDocument

Create a document from CDMD markdown (standard Markdown plus SB extensions — call getCdmdLanguageGuide if unfamiliar). The body goes in cdmd (content is accepted as an alias). A leading --- YAML frontmatter block is stored and preserved: title/exported_at/generator are managed by the platform, and any other key you set (doc_type, authority_state, owner, conforms_to, …) round-trips untouched through reads and later edits. Do not include DIAGRAM/IMAGE markers — insert them after with dedicated tools. Returns the new document's id and versionTimestamp (the optimistic-lock token for subsequent edits). Supports @-mentioning people: embed <!-- REFERENCE: {"type":"user","id":"<user_uuid>","label":"Name"} --> to notify a teammate. Use listAssignablePrincipals to look up the user_id from a name; mentions of users outside the project are silently dropped.

post/tools/createDocument

Request

  • Base URL: https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1
  • URL: https://api.stablebaseline.io/functions/v1/cloud-serve/api/v1/tools/createDocument
  • Auth: HTTP bearer

Request body

projectIdstring required
folderIdstring
titlestring
cdmdstring

Document body in CDMD markdown. Alias: content.

contentstring

Alias for cdmd — provide one of the two.

positionnumber

Sort position within the parent folder (or project root if no folderId). When omitted, the document is appended at the end.

changeSummarystring

Version history summary.

Response

Tool result (shape varies per tool — refer to the tool's docs for the exact return value).

object required

Changes

No recorded changes to this operation across all 1 revision of this API.