Documents
Stored files with their AI analysis: search, upload, download.
List and search documents#
GET /workspaces/{workspaceId}/documentsscope documents:read MCP 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#
Field Type Description workspaceIdstring Workspace id (from list_workspaces).
Query#
Field Type Description qstring Words to find, e.g. "stadtwerke 2026". categoryinvoice \contract \insurance \bank \tax \payslip \medical \school \authority \warranty \receipt \letter \otherlimitinteger Maximum number of results (1–100, default 25). Default: 25. cursorstring Cursor from nextCursor of the previous page.
Request#
Shell Copy
curl "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents" \
-H "Authorization: Bearer $LIFEBUTLER_KEY"
Response 200#
Field Type Description dataarray of Document data[].idstring data[].titlestring data[].categorystring invoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other data[].fileNamestring data[].mimeTypestring data[].sizeinteger Bytes. data[].documentDatestring or null YYYY-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.statusstring none, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded. data[].analysis.summarystring or null data[].analysis.issuerstring or null data[].analysis.resultobject or null Full AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags. nextCursorstring or null Pass as cursor to get the next page; null on the last page.
JSON Copy
{
"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:write MCP 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#
Field Type Description workspaceIdstring Workspace id (from list_workspaces).
Query#
Field Type Description fileName (required) string File name incl. extension, e.g. "rechnung.pdf". titlestring Title (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 Copy
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#
Field Type Description idstring titlestring categorystring invoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other fileNamestring mimeTypestring sizeinteger Bytes. documentDatestring or null YYYY-MM-DD: set by hand, else read by the AI. notesstring sha256string or null createdBystring or null createdAtstring or null analysisDocumentAnalysis analysis.statusstring none, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded. analysis.summarystring or null analysis.issuerstring or null analysis.resultobject or null Full AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON Copy
{
"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:read MCP get_document
Metadata and the AI analysis (summary, issuer, payment, deadlines, …). The file itself: download_document.
Path#
Field Type Description workspaceIdstring Workspace id (from list_workspaces). documentIdstring
Request#
Shell Copy
curl "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q" \
-H "Authorization: Bearer $LIFEBUTLER_KEY"
Response 200#
Field Type Description idstring titlestring categorystring invoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other fileNamestring mimeTypestring sizeinteger Bytes. documentDatestring or null YYYY-MM-DD: set by hand, else read by the AI. notesstring sha256string or null createdBystring or null createdAtstring or null analysisDocumentAnalysis analysis.statusstring none, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded. analysis.summarystring or null analysis.issuerstring or null analysis.resultobject or null Full AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON Copy
{
"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:write MCP update_document
Title, category, notes or date. What you set here is kept even if the AI analyses the document again.
Path#
Field Type Description workspaceIdstring Workspace id (from list_workspaces). documentIdstring
Body#
Field Type Description titlestring categoryinvoice \contract \insurance \bank \tax \payslip \medical \school \authority \warranty \receipt \letter \othernotesstring documentDatestring or null YYYY-MM-DD; null goes back to the AI's date.
Request#
Shell Copy
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#
Field Type Description idstring titlestring categorystring invoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other fileNamestring mimeTypestring sizeinteger Bytes. documentDatestring or null YYYY-MM-DD: set by hand, else read by the AI. notesstring sha256string or null createdBystring or null createdAtstring or null analysisDocumentAnalysis analysis.statusstring none, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded. analysis.summarystring or null analysis.issuerstring or null analysis.resultobject or null Full AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON Copy
{
"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:write MCP delete_document
Deletes the document and its file for everyone.
Path#
Field Type Description workspaceIdstring Workspace id (from list_workspaces). documentIdstring
Request#
Shell Copy
curl -X DELETE "https://api.lifebutler.io/v1/workspaces/f8Hn3wQz0a/documents/Dc5Yh1Pt8Q" \
-H "Authorization: Bearer $LIFEBUTLER_KEY"
Response 200#
Field Type Description idstring deletedtrue
JSON Copy
{
"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#
Field Type Description workspaceIdstring Workspace id (from list_workspaces). documentIdstring
Request#
Shell Copy
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:write MCP 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#
Field Type Description workspaceIdstring Workspace id (from list_workspaces). documentIdstring
Body#
Field Type Description againboolean Analyse a document that was already analysed once more (costs credits again). Default: false.
Request#
Shell Copy
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#
Field Type Description idstring titlestring categorystring invoice, contract, insurance, bank, tax, payslip, medical, school, authority, warranty, receipt, letter, other fileNamestring mimeTypestring sizeinteger Bytes. documentDatestring or null YYYY-MM-DD: set by hand, else read by the AI. notesstring sha256string or null createdBystring or null createdAtstring or null analysisDocumentAnalysis analysis.statusstring none, pending, done, error, refused, unsupported, tooLarge, off, noCredits or quotaExceeded. analysis.summarystring or null analysis.issuerstring or null analysis.resultobject or null Full AI result: payment (payee, amount, IBAN, due date), contract, deadlines, events, tasks, tags.
JSON Copy
{
"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": {}
}
}