FruxonDocs
ApiKnowledge bases

Creates a document in a knowledge base.

Adds a new authoring document. The document is not searchable until it is marked published and the parent knowledge base publish action pushes a new snapshot.

POST
/v1/tenants/{tenant}/knowledgeBases/{knowledgeBase}/documents
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

knowledgeBase*string

The knowledge base id.

Formatuuid
tenant*string

The tenant identifier

Document title, Markdown body, lifecycle status, and metadata.

title?string
bodyMarkdown?string
status?string

Per-document lifecycle, distinct from the knowledge-base :publish action. Status controls whether a document is eligible for the next snapshot; publish is what materializes it into the index. Only KnowledgeDocumentStatus.Published documents are included in a publish.

Value in"UNSPECIFIED" | "DRAFT" | "PUBLISHED" | "ARCHIVED"
locale?string|null
tags?|null
metadata?|null
sourceConversationIds?|null
knowledgeSourceId?string|null

The knowledge source the supplied item ids came through. Internal write tools set this so two source systems may use the same local item id without sharing provenance or an upsert identity.

Formatuuid
sourceFrom?integer|null

When the conversations in CreateKnowledgeDocumentRequest.SourceConversationIds began (Unix millis), when the caller knows. Tested against the base's knowledge notices: an article built from a conversation held during one needs a decision before it is published (KnowledgeBases.KnowledgeNoticeStamp). Omitted, a write dispatched by an automation is dated from its item's record, and any other from the moment it is recorded.

Formatint64
sourceTo?integer|null

When those conversations ended; see CreateKnowledgeDocumentRequest.SourceFrom.

Formatint64
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "00000000-0000-0000-0000-000000000000",
  "knowledgeBaseId": "00000000-0000-0000-0000-000000000000",
  "title": "string",
  "bodyMarkdown": "string",
  "status": "DRAFT",
  "locale": "string",
  "tags": [
    "string"
  ],
  "metadata": {},
  "sourceConversationIds": [
    "string"
  ],
  "lastReviewedAt": 0,
  "lastReviewedBy": "string",
  "createdAt": 0,
  "modifiedAt": 0,
  "contentRevision": 0,
  "liveVersion": {
    "title": "string",
    "bodyMarkdown": "string"
  },
  "lastChange": {
    "cause": "AUTHORED",
    "actorId": "string",
    "agentId": "string",
    "at": 0
  }
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}