Hanzo AI

Create docs

Creates a document, as the caller, after its siblings.

POST /v1/team/docs

Addresshttps://api.hanzo.ai/v1/team/docs
MethodPOST
Operationpost_team_docs
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a document, as the caller, after its siblings.

It is created through the Team client's own write path, so it appears in an open Documents sidebar live, and its author is subscribed to it: a comment on it lands in their inbox. Its body starts empty — open the returned collaborator id on the /v1/team/collaborator socket to write it.

A space whose caller can write no teamspace at all gets one on its first document: a public "General" teamspace every current member of the space is in, which is what the Team client would otherwise make somebody create by hand before the first page. Guests and agents are not made members of it.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
parentbodystring—Parent nests the new document under another one.
spacebodystring—Space is the space uuid.
teamspacebodystring—Teamspace is where the document goes.
titlebodystring—Title is the document's title.

Response

StatusBodyMeaning
201team.teamDoccreated
defaultproblem-detailsrefused

201 body — 11 fields.

FieldInTypeAlwaysDescription
authorbodystring—Author is the account uuid that created it.
collaboratorbodystring—Collaborator is the documentId to open the body with on the /v1/team/collaborator Y.js socket: "<space>|document:class:Document|<id>|content".
commentsbodyinteger (int64)—Comments is how many comments it has.
createdOnbodyinteger (int64)—CreatedOn is when it was created, unix milliseconds.
idbodystring—ID is the document's own id.
modifiedOnbodyinteger (int64)—ModifiedOn is when its title or place last changed, unix milliseconds.
parentbodystring—Parent is the document this one is nested under.
rankbodystring—Rank orders siblings: compare as plain strings, ascending.
spacebodystring—Space is the space uuid holding it.
teamspacebodystring—Teamspace is the teamspace it belongs to.
titlebodystring—Title is the document's title.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Team API · All Hanzo APIs · Interactive reference

How is this guide?

On this page