Menu

Documents

Stored files with their AI analysis: search, upload, download.

List and search documents#

GET/workspaces/{workspaceId}/documentsscope documents:readMCP list_documents

Newest first. With q, a text search over title, file name, notes, category and the AI analysis (summary, issuer, key content, tags); every word must match, accents and case don't matter. For questions in natural language use search or ask_butler.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).

Query#

FieldTypeDescription
qstringWords to find, e.g. "stadtwerke 2026".
categoryinvoice \contract \insurance \bank \tax \payslip \medical \school \authority \warranty \receipt \letter \other
limitintegerMaximum number of results (1–100, default 25). Default: 25.
cursorstringCursor from nextCursor of the previous page.

Request#

Shell
curl "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY"

Response 200#

FieldTypeDescription
dataarray of Document
data[].idstring
data[].titlestring
data[].categorystringinvoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other
data[].fileNamestring
data[].mimeTypestring
data[].sizeintegerBytes.
data[].documentDatestring or nullYYYY-MM-DD: set by hand, else read by the AI.
data[].notesstring
data[].sha256string or null
data[].createdBystring or null
data[].createdAtstring or null
data[].analysisDocumentAnalysis
data[].analysis.statusstringnone, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded.
data[].analysis.summarystring or null
data[].analysis.issuerstring or null
data[].analysis.resultobject or nullFull AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
nextCursorstring or nullPass as cursor to get the next page; null on the last page.
JSON
{
  "data": [
    {
      "id": "Ab3Cd5Ef7G",
      "title": "Elternabend 3b",
      "category": "string",
      "fileName": "rechnung.pdf",
      "mimeType": "application/pdf",
      "size": 184320,
      "documentDate": "2026-11-20",
      "notes": "",
      "sha256": "string",
      "createdBy": "string",
      "createdAt": "2026-11-20T19:30:00+01:00",
      "analysis": {
        "status": "string",
        "summary": "string",
        "issuer": "string",
        "result": {}
      }
    }
  ],
  "nextCursor": "string"
}

Upload a document#

POST/workspaces/{workspaceId}/documentsscope documents:writeMCP upload_document

Send the file as the raw request body with its Content-Type (PDF, JPEG, PNG, WebP, GIF, HEIC; max 25 MB) and the file name in the query. Like an upload in the app: a duplicate (same content) answers 409 with its id, the file counts towards the owner's storage, and – if the workspace has AI on and your document setting is automatic – it is analysed right away (1 credit per page).

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).

Query#

FieldTypeDescription
fileName (required)stringFile name incl. extension, e.g. "rechnung.pdf".
titlestringTitle (default: the file name without extension).

Body#

The file's bytes; Content-Type: application/pdf, image/jpeg, image/png, image/webp, image/gif or image/heic.

Request#

Shell
curl -X POST "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents?fileName=rechnung.pdf" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY" \
  -H "Content-Type: application/pdf" \
  --data-binary @rechnung.pdf

Response 201#

FieldTypeDescription
idstring
titlestring
categorystringinvoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other
fileNamestring
mimeTypestring
sizeintegerBytes.
documentDatestring or nullYYYY-MM-DD: set by hand, else read by the AI.
notesstring
sha256string or null
createdBystring or null
createdAtstring or null
analysisDocumentAnalysis
analysis.statusstringnone, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded.
analysis.summarystring or null
analysis.issuerstring or null
analysis.resultobject or nullFull AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON
{
  "id": "Ab3Cd5Ef7G",
  "title": "Elternabend 3b",
  "category": "string",
  "fileName": "rechnung.pdf",
  "mimeType": "application/pdf",
  "size": 184320,
  "documentDate": "2026-11-20",
  "notes": "",
  "sha256": "string",
  "createdBy": "string",
  "createdAt": "2026-11-20T19:30:00+01:00",
  "analysis": {
    "status": "string",
    "summary": "string",
    "issuer": "string",
    "result": {}
  }
}

Get a document#

GET/workspaces/{workspaceId}/documents/{documentId}scope documents:readMCP get_document

Metadata and the AI analysis (summary, issuer, payment, deadlines, …). The file itself: download_document.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).
documentIdstring

Request#

Shell
curl "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY"

Response 200#

FieldTypeDescription
idstring
titlestring
categorystringinvoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other
fileNamestring
mimeTypestring
sizeintegerBytes.
documentDatestring or nullYYYY-MM-DD: set by hand, else read by the AI.
notesstring
sha256string or null
createdBystring or null
createdAtstring or null
analysisDocumentAnalysis
analysis.statusstringnone, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded.
analysis.summarystring or null
analysis.issuerstring or null
analysis.resultobject or nullFull AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON
{
  "id": "Ab3Cd5Ef7G",
  "title": "Elternabend 3b",
  "category": "string",
  "fileName": "rechnung.pdf",
  "mimeType": "application/pdf",
  "size": 184320,
  "documentDate": "2026-11-20",
  "notes": "",
  "sha256": "string",
  "createdBy": "string",
  "createdAt": "2026-11-20T19:30:00+01:00",
  "analysis": {
    "status": "string",
    "summary": "string",
    "issuer": "string",
    "result": {}
  }
}

Change a document#

PATCH/workspaces/{workspaceId}/documents/{documentId}scope documents:writeMCP update_document

Title, category, notes or date. What you set here is kept even if the AI analyses the document again.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).
documentIdstring

Body#

FieldTypeDescription
titlestring
categoryinvoice \contract \insurance \bank \tax \payslip \medical \school \authority \warranty \receipt \letter \other
notesstring
documentDatestring or nullYYYY-MM-DD; null goes back to the AI's date.

Request#

Shell
curl -X PATCH "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Elternabend 3b"}'

Response 200#

FieldTypeDescription
idstring
titlestring
categorystringinvoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other
fileNamestring
mimeTypestring
sizeintegerBytes.
documentDatestring or nullYYYY-MM-DD: set by hand, else read by the AI.
notesstring
sha256string or null
createdBystring or null
createdAtstring or null
analysisDocumentAnalysis
analysis.statusstringnone, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded.
analysis.summarystring or null
analysis.issuerstring or null
analysis.resultobject or nullFull AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON
{
  "id": "Ab3Cd5Ef7G",
  "title": "Elternabend 3b",
  "category": "string",
  "fileName": "rechnung.pdf",
  "mimeType": "application/pdf",
  "size": 184320,
  "documentDate": "2026-11-20",
  "notes": "",
  "sha256": "string",
  "createdBy": "string",
  "createdAt": "2026-11-20T19:30:00+01:00",
  "analysis": {
    "status": "string",
    "summary": "string",
    "issuer": "string",
    "result": {}
  }
}

Delete a document#

DELETE/workspaces/{workspaceId}/documents/{documentId}scope documents:writeMCP delete_document

Deletes the document and its file for everyone.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).
documentIdstring

Request#

Shell
curl -X DELETE "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY"

Response 200#

FieldTypeDescription
idstring
deletedtrue
JSON
{
  "id": "Ab3Cd5Ef7G",
  "deleted": false
}

Download the file#

GET/workspaces/{workspaceId}/documents/{documentId}/filescope documents:read

The original file (PDF or image) with its Content-Type and file name.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).
documentIdstring

Request#

Shell
curl "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q/file" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY"

Response 200#

The file itself, with Content-Type and Content-Disposition (file name).

Analyse a document with AI#

POST/workspaces/{workspaceId}/documents/{documentId}/analyzescope documents:writeMCP analyze_document

Starts the AI analysis (1 credit per page, paid by the workspace owner). It runs in the background: poll get_document until analysis.status is no longer pending. Needs AI turned on for the workspace.

Path#

FieldTypeDescription
workspaceIdstringWorkspace id (from list_workspaces).
documentIdstring

Body#

FieldTypeDescription
againbooleanAnalyse a document that was already analysed once more (costs credits again). Default: false.

Request#

Shell
curl -X POST "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q/analyze" \
  -H "Authorization: Bearer $LIFEBUTLER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"again": false}'

Response 202#

FieldTypeDescription
idstring
titlestring
categorystringinvoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other
fileNamestring
mimeTypestring
sizeintegerBytes.
documentDatestring or nullYYYY-MM-DD: set by hand, else read by the AI.
notesstring
sha256string or null
createdBystring or null
createdAtstring or null
analysisDocumentAnalysis
analysis.statusstringnone, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded.
analysis.summarystring or null
analysis.issuerstring or null
analysis.resultobject or nullFull AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON
{
  "id": "Ab3Cd5Ef7G",
  "title": "Elternabend 3b",
  "category": "string",
  "fileName": "rechnung.pdf",
  "mimeType": "application/pdf",
  "size": 184320,
  "documentDate": "2026-11-20",
  "notes": "",
  "sha256": "string",
  "createdBy": "string",
  "createdAt": "2026-11-20T19:30:00+01:00",
  "analysis": {
    "status": "string",
    "summary": "string",
    "issuer": "string",
    "result": {}
  }
}