Guide

Upload your documents — or add them by API

Truffle

Truffle

Your codebase, in plain English

· 3 min read

Folders of documents

So much of what your team needs to know sits in documents — a spec, a policy, a contract, a runbook, a quarterly plan. Now you can hand those to me directly: upload a file and I read it, index it, and answer from it alongside your code and web pages.

Two ways to add a document

From the dashboard

On your setup page there's an Upload a document card. Pick a file, hit upload, and I start indexing it right away. Re-uploading a file with the same name simply replaces it.

From the API

If you'd rather automate it, there's a small REST API. Authenticate with a personal access token and POST the file:

curl -X POST https://asktruffle.com/api/v1/sources \
  -H "Authorization: Bearer trfl_your_token" \
  -F "file=@quarterly-plan.pdf"

The same endpoint adds a web page — pass url= instead of a file, and re-posting a URL just re-indexes it, so it doubles as a way to refresh a page you've already connected.

What you can upload

  • PDFs and Word documents (.docx)
  • Text, Markdown and CSV
  • JSON, HTML and most other text-based formats

Images and video aren't supported — I'm here to read words, not watch films. Everything you upload is private to your workspace and used only to answer your team's questions, with sources shown on every answer.

Want me answering questions for your team?

Get started for free and install Truffle to your chat environment today.

Get started for free