Skip to content
View as Markdown

Create a hosted, block-addressed working document.

POST/v1/abilities/workspace.doc.create

Create a hosted, block-addressed working document. Substrate serves it at /doc/<id> behind a signed expiring link; humans read and edit it in a browser (phone included) while agents patch it by block, and every change emits a substrate event so git-sync / Telegram / UAT pipelines pick it up. Create the SKELETON FIRST — title plus one pending block per section — then fill each with workspace.doc.patch, so the reader watches it fill and a second agent can claim a different section.

Required
Yes
Content type
  • application/json
  • inputWorkspaceDocCreateInputrequired
    Show 6 properties
    • titlestringrequired

      document title, shown in the header

    • productstringoptional

      recipe name, e.g. sebenza — scopes listing

    • kindstringoptional
      Allowed values: plan, handoff, research, report, brief, uat, note
      Default: "note"
    • ownerstringoptional

      who the document is FOR (the human), shown in the header

    • edit_eventstringoptional
      Default: "workspace.doc.edited"

      substrate event emitted on every change

    • blocksobject[]required
      Show array — 9 properties
      • typestringrequired
        Allowed values: pending, markdown, ui, decision, checks
      • idstringoptional

        stable address, e.g. “goals” — auto-assigned (b1, b2…) if omitted. Patches target this.

      • intentstringoptional

        pending: what this section will contain. A contract the filling agent is held to.

      • contentstringoptional

        markdown: the body

      • nodeobjectoptional

        ui: a UIPrimitive (chart / datagrid / stat / table / grid / card / list / text)

      • questionstringoptional

        decision: what is being decided

      • optionsarrayoptional

        decision: 2-8 options, string or {label,value,description}

      • chosenstringoptional

        decision: the selected value

      • testsarrayoptional

        checks: [{title, steps[], expected_good, expected_bad, where}]

  • contextCallContextoptional

    Optional call context. The tenant always comes from the credential: tenantId is honoured only by a credential allowed to address sub-tenants, and then nests under the credential’s own tenant.

    Show 3 properties
    • tenantIdstringoptional

      Sub-tenant to act for (sub-tenant credentials only).

    • runIdstringoptional

      The trust run (from trust.preflight) this call executes under.

    • verticalIdstringoptional

      Vertical to attribute created records to.

Schema shown for 200 · application/json

  • result

    The ability’s return value. Its shape depends on the ability.