fabric-api
Create/search Fabric resources via HTTP API (notepads, folders, bookmarks, files).
Best use case
fabric-api is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create/search Fabric resources via HTTP API (notepads, folders, bookmarks, files).
Teams using fabric-api should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/fabric-api/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How fabric-api Compares
| Feature / Agent | fabric-api | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create/search Fabric resources via HTTP API (notepads, folders, bookmarks, files).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Fabric API (HTTP via curl)
Use this skill to read/write content in a user's Fabric workspace using the Fabric HTTP API (`https://api.fabric.so`).
## 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": "<uuid>" }`
- 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):
```json5
{
skills: {
entries: {
"fabric-api": {
enabled: true,
apiKey: "YOUR_FABRIC_API_KEY"
}
}
}
}
````
## HTTP basics
* Base: `https://api.fabric.so`
* Auth: `X-Api-Key: $FABRIC_API_KEY`
* JSON: `Content-Type: application/json`
For debugging: prefer `--fail-with-body` so 4xx bodies are shown.
## Canonical curl templates (use heredocs to avoid quoting bugs)
### GET
```bash
curl -sS --fail-with-body "https://api.fabric.so/v2/user/me" \
-H "X-Api-Key: $FABRIC_API_KEY"
```
### POST (JSON)
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/ENDPOINT" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{ "replace": "me" }
JSON
```
## Core workflows
### 1) Create a notepad (note)
Endpoint: `POST /v2/notepads`
* Map user-provided "title" → `name` in the API payload.
* Always include `parentId`.
* Use `text` for markdown content.
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/notepads" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"name": "Calendar Test Note",
"text": "Created via Clawdbot",
"parentId": "@alias::inbox",
"tags": [{"name":"calendar"},{"name":"draft"}]
}
JSON
```
If tags cause validation trouble, omit them and create/assign later via `/v2/tags`.
### 2) Create a folder
Endpoint: `POST /v2/folders`
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/folders" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"name": "My new folder",
"parentId": "@alias::inbox",
"description": null
}
JSON
```
### 3) Create a bookmark
Endpoint: `POST /v2/bookmarks`
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/bookmarks" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"url": "https://example.com",
"parentId": "@alias::inbox",
"name": "Example",
"tags": [{"name":"reading"}]
}
JSON
```
### 4) Browse resources (list children of a folder)
Endpoint: `POST /v2/resources/filter`
Use this to list what's inside a folder (use a folder UUID as `parentId`).
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/resources/filter" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"parentId": "PARENT_UUID_HERE",
"limit": 50,
"order": { "property": "modifiedAt", "direction": "DESC" }
}
JSON
```
### 5) Search
Endpoint: `POST /v2/search`
Use search when the user gives a fuzzy description (“the note about…”).
```bash
curl -sS --fail-with-body -X POST "https://api.fabric.so/v2/search" \
-H "X-Api-Key: $FABRIC_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"queries": [
{
"mode": "text",
"text": "meeting notes",
"filters": { "kinds": ["notepad"] }
}
],
"pagination": { "page": 1, "pageSize": 20 },
"sort": { "field": "modifiedAt", "order": "desc" }
}
JSON
```
## Tags (safe patterns)
### List tags
`GET /v2/tags?limit=100`
### Create tag
`POST /v2/tags` with `{ "name": "tag name", "description": null, "resourceId": null }`
### Assign tags on create
Use `tags: [{"name":"x"}]` or `tags: [{"id":"<uuid>"}]` only.
## Rate limiting + retries
If you get `429 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`
When in doubt, consult it before guessing endpoint names or payload shapes.Related Skills
portfolio-watcher
Monitor stock/crypto holdings, get price alerts, track portfolio performance
portainer
Control Docker containers and stacks via Portainer API. List containers, start/stop/restart, view logs, and redeploy stacks from git.
portable-tools
Build cross-device tools without hardcoding paths or account names
polymarket
Trade prediction markets on Polymarket. Analyze odds, place bets, track positions, automate alerts, and maximize returns from event outcomes. Covers sports, politics, entertainment, and more.
polymarket-traiding-bot
No description provided.
polymarket-analysis
Analyze Polymarket prediction markets for trading edges. Pair Cost arbitrage, whale tracking, sentiment analysis, momentum signals, user profile tracking. No execution.
polymarket-agent
Autonomous prediction market agent - analyzes markets, researches news, and identifies trading opportunities
polymarket-5
Query Polymarket prediction markets. Use for questions about prediction markets, betting odds, market prices, event probabilities, or when user asks about Polymarket data.
polymarket-4
Query Polymarket prediction markets. Use for questions about prediction markets, betting odds, market prices, event probabilities, or when user asks about Polymarket data.
polymarket-3
Query Polymarket prediction market odds and events via CLI. Search for markets, get current prices, list events by category. Supports sports betting (NFL, NBA, soccer/EPL, Champions League), politics, crypto, elections, geopolitics. Real money markets = more accurate than polls. No API key required. Use when asked about odds, probabilities, predictions, or "what are the chances of X".
polymarket-2
Query Polymarket prediction markets - check odds, trending markets, search events, track prices.
pollinations
Pollinations.ai API for AI generation - text, images, videos, audio, and analysis. Use when user requests AI-powered generation (text completion, images, videos, audio, vision/analysis, transcription) or mentions Pollinations. Supports 25+ models (OpenAI, Claude, Gemini, Flux, Veo, etc.) with OpenAI-compatible chat endpoint and specialized generation endpoints.