Files, Attachments & Collections
Updated 2026-07-08
Files, attachments, and collections
This guide explains how files, attachments, and collections work across the dashboard, REST API, and MCP.
Files
A Usable file is a workspace-level asset. It can exist independently of a fragment and can be attached to one or more fragments when relevant.
When to use files
Use files for:
- PDFs, screenshots, diagrams, spreadsheets, exported reports, and reference assets.
- Evidence attached to a troubleshooting or solution fragment.
- Source material for public documentation.
- Assets that should be searchable by filename/tags.
Do not use files for secrets or credential exports, unreviewed customer data in public workspaces, or material that should be summarized as a fragment instead.
REST file endpoints
| Method | Endpoint | Purpose |
|---|---|---|
POST | /api/files/upload | Upload file with multipart form data |
GET | /api/files/search | Search files by workspace, query, tags, MIME type |
GET | /api/files/{id} | Get metadata |
PATCH | /api/files/{id} | Update metadata such as name/tags |
DELETE | /api/files/{id} | Delete file |
GET | /api/files/{id}/download | Download file |
GET | /api/files/{id}/status | Poll upload/processing status |
POST | /api/files/{id}/attachments | Attach file to fragment |
DELETE | /api/files/{id}/attachments | Remove file attachment |
GET | /api/fragments/{id}/files | List files attached to a fragment |
Upload example
curl https://usable.dev/api/files/upload \
-H "Authorization: Bearer <personal-access-token>" \
-F "workspaceId=YOUR_WORKSPACE_ID" \
-F "tags=[\"docs\",\"source\"]" \
-F "file=@./public-api-reference.pdf"The upload is asynchronous. Poll status before attaching or downloading. The public API documents a 50 MB file limit.
MCP file tools
| Tool | Use |
|---|---|
request-upload-url | Begin a client-assisted upload flow |
search-files | Search file metadata in a workspace |
get-file | Get file metadata and download URL |
attach-file-to-fragment | Attach an uploaded file to a fragment |
Collections
Collections curate fragments into a named set. They are best for groups that humans or AI clients should treat as related.
Good collection names
Public platform docs v1.195.0Customer onboarding guideAPI integration recipesRelease notes and upgrade guidance
REST collection endpoints
| Method | Endpoint | Purpose |
|---|---|---|
GET | /api/workspaces/{id}/collections | List collections |
POST | /api/workspaces/{id}/collections | Create collection |
GET | /api/workspaces/{id}/collections/{collectionId} | Get details |
PATCH | /api/workspaces/{id}/collections/{collectionId} | Update name/description |
DELETE | /api/workspaces/{id}/collections/{collectionId} | Delete collection |
GET | /api/workspaces/{id}/collections/{collectionId}/fragments | List fragments |
POST | /api/workspaces/{id}/collections/{collectionId}/fragments | Add fragments |
DELETE | /api/workspaces/{id}/collections/{collectionId}/fragments | Remove fragments |
MCP collection tools
| Tool | Use |
|---|---|
create-collection | Create a collection |
get-collection | Read collection details and optionally fragments |
list-collections | List workspace collections |
update-collection | Update collection metadata |
Fragment collection membership is commonly managed by collectionIds on MCP create-memory-fragment and update-memory-fragment, or by the REST collection endpoints for deterministic batch scripts.
Fragment symlinks and auto-link rules
Usable supports fragment symlink/relationship operations through MCP tools and workspace-overview auto-link rules.
Manual MCP symlink tools
create-fragment-symlinkremove-fragment-symlink
Auto-link rules
Auto-link rules are workspace-level rules managed by owners/collaborators from the workspace overview page. They match source-workspace fragment tags and create symlinked fragments in a target workspace.
Rule fields:
| Field | Meaning |
|---|---|
matchMode | any or all |
tags | 1–25 tags to match |
targetWorkspaceId | Destination workspace (must differ from source) |
enabled | Boolean toggle |
Since v1.195.0, symlink child fragments are marked with createdVia: "symlink" and include an optional symlinkParentId. Reports that should count only original authoring should exclude or separately group createdVia: "symlink".
Webhooks
Webhooks are workspace-level integration hooks for external automation.
Public REST endpoints:
GET /api/workspaces/{id}/webhooksPOST /api/workspaces/{id}/webhooksPATCH /api/workspaces/{id}/webhooks/{webhookId}DELETE /api/workspaces/{id}/webhooks/{webhookId}POST /api/workspaces/{id}/webhooks/trigger
Recommended workflow:
- Create a webhook receiver in your service.
- Configure the webhook in workspace settings.
- Select only the event types needed.
- Use the manual trigger/test flow before production.
- Rotate secrets or disable the webhook if exposed.
Permissions
| Action | Read | Collaborator | Owner |
|---|---|---|---|
| View fragments | Yes | Yes | Yes |
| Create/edit fragments | No | Yes | Yes |
| Upload files | Usually no | Yes | Yes |
| Attach files | No | Yes | Yes |
| Create/update collections | Usually no | Yes | Yes |
| Manage webhooks/settings | No | Usually no | Yes |
| Subscribe to public workspace | Authenticated user | Authenticated user | Authenticated user |
Troubleshooting
| Issue | Solution |
|---|---|
| File appears in Files but not on the fragment | It may be uploaded but not attached. Use attach-file-to-fragment or REST POST /api/files/{id}/attachments. |
| Collection is empty after import | Check whether fragments were created successfully and whether collectionIds was passed on create/update. |
| AI client cannot find a collection | Use list-collections with the exact workspace ID. |
| File download returns 403 | Token lacks access to the file’s workspace. Use a token scoped to that workspace. |
| Public workspace subscriber cannot add fragments | Subscriber access is read-only. Request collaborator or owner access. |
| Webhook test fails | Verify receiver URL, HTTPS/TLS, authentication, selected events, and that the receiver returns a success status quickly. |