Skip to main content

Upload a document

POST https://api.rollstack.com/public/v1/documents

Stores a document for the slides agent to read, such as a brief, a report or meeting notes, as when you attach one in the chat in the app: pass its id in documentIds on sendReportMessage. Over MCP, send the document's whole text as Markdown in text. Over REST, you can instead send the file as multipart/form-data in the file field: a .docx, .doc, .odt, .rtf, .pptx, .pdf, .txt or .md file of at most 100 MB and 100 pages, whose pages the agent can also look at. It joins your document library when you and your organization keep one.

Requires the slide_decks:write scope.

Operation ID: createDocument.

Headers

  • Idempotency-Key (string): A unique value, such as a UUID, that makes retrying this call safe. A retry with the same key within 24 hours answers the first call's result instead of running it again. Use a new key for each new call. From 1 to 255 printable ASCII characters.

Request body, required

application/json

  • name (string, required): The document's name, without an extension: it is stored as a Markdown file named after it. The slides agent and the app's chat show it. From 1 to 200 characters. Example: Q3 strategy brief.
  • text (string, required): The document's whole text, in Markdown: headings, lists and tables keep their structure for the agent. Send what the document says, not a summary of it. Example: `# Q3 strategy brief

    Revenue grew 12% in EMEA...`.

multipart/form-data

  • file (string (binary), required): The document to upload, stored under its file name. Its name must end in .docx, .doc, .odt, .rtf, .pptx, .pdf, .txt or .md, and it can be at most 100 MB and 100 pages.

Response 201

Success

application/json

  • id (string, required): Unique identifier for the document. Pass it in documentIds to sendReportMessage.
  • name (string, required): The document's file name, such as Q3 strategy brief.pdf.
  • pageCount (number or null, required): How many pages the document has, which the agent can look at. null for a text or Markdown file.