fabric-api
Create/search Fabric resources via HTTP API (notepads, folders, bookmarks, files).
Installation
npx clawhub@latest install fabric-apiView the full skill documentation and source below.
Documentation
Fabric API (HTTP via curl)
Use this skill to read/write content in a user's Fabric workspace using the Fabric HTTP API ().
## Critical gotchas (read first)
- "Notes" are created via **POST /v2/notepads** (not /v2/notes).
- Most create endpoints require **parentId**:
- A UUID **or** one of: @alias::inbox, @alias::bin.
- Notepad create requires:
- parentId
- AND either text (markdown string) **or** ydoc (advanced/structured).
- tags must be an array of objects, each *either*:
- { "name": "tag name" } or { "id": "" }
- Never nested arrays; never strings.
When the user doesn't specify a destination folder: default to parentId: "@alias::inbox".
## Setup (Clawdbot)
This skill expects the API key in:
- FABRIC_API_KEY
Recommended config (use apiKey; Clawdbot will inject FABRIC_API_KEY because primaryEnv is set):
__CODE_BLOCK_0__
HTTP basics
- Base:
* Auth:X-Api-Key: $FABRIC_API_KEY* JSON:Content-Type: application/jsonFor debugging: prefer--fail-with-bodyso 4xx bodies are shown. ## Canonical curl templates (use heredocs to avoid quoting bugs) ### GET __CODE_BLOCK_1__ ### POST (JSON) __CODE_BLOCK_2__ ## Core workflows ### 1) Create a notepad (note) Endpoint:POST /v2/notepads* Map user-provided "title" →namein the API payload. * Always includeparentId. * Usetextfor markdown content. __CODE_BLOCK_3__ If tags cause validation trouble, omit them and create/assign later via/v2/tags. ### 2) Create a folder Endpoint:POST /v2/folders__CODE_BLOCK_4__ ### 3) Create a bookmark Endpoint:POST /v2/bookmarks__CODE_BLOCK_5__ ### 4) Browse resources (list children of a folder) Endpoint:POST /v2/resources/filterUse this to list what's inside a folder (use a folder UUID asparentId). __CODE_BLOCK_6__ ### 5) Search Endpoint:POST /v2/searchUse search when the user gives a fuzzy description (“the note about…”). __CODE_BLOCK_7__ ## Tags (safe patterns) ### List tagsGET /v2/tags?limit=100### Create tagPOST /v2/tagswith{ "name": "tag name", "description": null, "resourceId": null }### Assign tags on create Usetags: [{"name":"x"}]ortags: [{"id":""}]only. ## Rate limiting + retries If you get429 Too Many Requests: * Back off (sleep + jitter) and retry. * Avoid tight loops; do pagination slowly. Do not blindly retry create requests without idempotency (you may create duplicates). ## Troubleshooting quick map *404 Not Found: almost always wrong endpoint, wrong resourceId/parentId, or permissions. *400 Bad Request: schema validation; check required fields and tag shape. *403 Forbidden: subscription/permission limits. *429 Too Many Requests: back off + retry. ## API reference The OpenAPI schema lives here: *{baseDir}/fabric-api.yaml`