Documents

Two project-scoped document subsystems - collaboratively-edited rich-text Documents (and Wiki pages) and Portable Document PDF templates you fill from record data.


Blue has two distinct document subsystems, and they share little beyond living inside a workspace (a Project in the API). Don’t conflate them:

  • Rich-text Documents are collaboratively-edited pages with a title, HTML content, and an optional base64-encoded collab snapshot. The same Document type powers Wiki pages - a document with wiki: true is a Wiki page, everything else is identical.
  • Portable Documents are PDF templates. You upload a PDF (max 10 pages), overlay fields that map a record’s attributes - title, due date, assignees, tags, custom fields - onto its pages, then print a filled PDF for any specific record. This is a completely separate model (PortableDocument) created from an uploaded file.

This section covers creating, editing, deleting, querying, and subscribing to rich-text documents, plus building Portable Document templates and printing them.

POST https://api.blue.cc/graphql
X-Bloo-Token-ID: YOUR_TOKEN_ID
X-Bloo-Token-Secret: YOUR_TOKEN_SECRET
X-Bloo-Company-ID: YOUR_COMPANY_ID
X-Bloo-Project-ID: project_123

Both subsystems are scoped by the X-Bloo-Project-ID header (or a projectId in the input). Company and project headers accept either an ID or a slug. Header names are case-insensitive.

Type mapping

The product nouns map to GraphQL types as follows. Use the product word in prose, the schema name in code.

Product nounSchema type
Document / Wiki pageDocument (a Wiki page is a Document with wiki: true)
Workspace / ProjectProject
Portable DocumentPortableDocument
Portable Document pagePortableDocumentPage
Overlay fieldPortableDocumentField
RecordTodo (the row whose data fills a printed Portable Document)

Pages

PageCovers
Create and edit documentsCreate a rich-text document or Wiki page, update it, and delete it - createDocument, updateDocument, deleteDocument.
Query and subscribe to documentsFetch one document, list a project’s documents with filtering/sorting/pagination, and subscribe to real-time create/update/delete events.
Build Portable Document templatesCreate a Portable Document template from an uploaded PDF, rename it, delete it, fetch one, and list a project’s templates.
Map fields and print Portable DocumentsPlace, update, and delete overlay fields that bind record attributes to a page, then print a filled PDF for a given record.
  • Records - the Todo objects whose data fills a printed Portable Document.
  • Custom Fields - the CustomField values an overlay field can map onto a page.
  • Files - uploading the source PDF you turn into a Portable Document template.