REST API Reference
Bossa exposes a REST API for all filesystem operations. Use it when MCP isn’t available or when building custom integrations. Base URL:https://bossamemory.com/api/v1
Authentication: Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY
Endpoints
Create or Overwrite a File
200 — {"path": "/docs/readme.md", "content": "..."}
Bulk Create/Overwrite Files
- Max 100 files per request.
- Parent folders are created automatically.
200 — {"created": 2, "updated": 0, "failed": []}
Read a File
200 — {"path": "/docs/readme.md", "content": "..."}
Errors: 404 if file not found
List Directory
Response:
200 — Without metadata: {"items": ["customers/", "docs/", "readme.txt"]}. With metadata=true: {"items": [{"name": "docs/", "type": "directory"}, {"name": "readme.txt", "type": "file", "size": 1024, "modified": "2026-03-06T10:00:00Z"}]}. Directories end with /.
Stat (File Metadata)
200 — {"path": "/docs/readme.md", "size": 1024, "modified": "2026-03-06T10:00:00Z", "created": "2026-03-01T08:00:00Z"}. 404 if not found.
Tree
path (default /), depth (optional, limits recursion).
Response: 200 — {"tree": " a/\n b/\n file.txt"}
Disk Usage
200 — {"usage": [{"path": "/", "size": 4096}, {"path": "/docs", "size": 2048}]}
Batch Operations
200 — {"results": [{"op": "read", "path": "...", "content": "..."}, ...]}
Search (Grep)
At least one of
pattern, all_of, any_of, or none_of is required.
Response: 200 — Depends on output_mode:
matches:{matches: [{path, line_number, line, context_before, context_after}], has_more, next_offset}files_with_matches:{files: ["/path/a.md", "/path/b.md"]}count:{count: 42, total_matches: 42}
Glob Search
Response:
200 — {"paths": ["/docs/a.md", "/docs/b.md"]}
Edit a File
Replaces the first occurrence of
old_string with new_string.
Response: 200 — {"path": "/config.json", "edited": true}
Errors: 404 if file not found or old_string not in file
Delete a File
200 — {"path": "/docs/old.txt", "deleted": true}
Errors: 404 if file not found
Usage
200 — {"storage_mb": 12.5, "files_count": 42, "requests_today": 156, "tier": "free", "limits": {"storage_mb": 100, "files": 500, "requests_per_day": 1000}}
See Pricing & Limits for tier details.
Billing
Create Checkout Session
bossa login), not API key.
Query: interval — month (default) or year
Response: 200 — {"checkout_url": "https://checkout.stripe.com/..."}
Redirect the user to checkout_url to complete payment. See Pricing & Limits.
Create Portal Session
bossa login), not API key.
Response: 200 — {"url": "https://billing.stripe.com/..."}
Redirect the user to url to manage their subscription. Returns 400 with "No billing account. Run 'bossa billing upgrade' first." if the user has no Stripe customer. Returns 503 if billing is not configured.
Public Endpoint
Health Check
200 with {"status": "ok"}.