Documents

Create Library Document

Create a TEXT document from a string.

The counterpart to /documents/upload: no file, no extraction, the content you send is the content stored. Use it for material you already have as text.

post/library/documents

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/library/documents
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

folder_pathstring required

Where it lands, e.g. Library/Case Studies. The folder must already exist.

file_namestring required

Stored file name.

display_namestring required

How the document is listed.

contentstring required

The document text. Stored verbatim.

sourcestring

Where the text came from; manual or copilot are what the app writes. NOT validated by the app, so any value is accepted and stored as given.

copilot_session_idstring nullable

The Copilot session that produced it, when source is copilot.

context_type'global' | 'campaign' | 'account'

Whose library this belongs to.

campaign_idstring nullable

REQUIRED when context_type is campaign.

account_idstring nullable

REQUIRED when context_type is account.

Response

Successful Response

dataDocumentPayload required

An open envelope for one document, folder or questionnaire.

Open on purpose: a Library document carries extraction metadata, a questionnaire carries per-provider processing detail, and a generated deal document carries structured_data and highlights whose shape is the generator's rather than this contract's. Pinning those would silently drop whatever the app learned to return that this file had not caught up on.

Changes

No recorded changes to this operation across all 3 revisions of this API.