API & tools

Developers — API

One POST per tool

Every tool is a POST to /api/tools/<name> with a bearer key and a JSON body.

01—Authenticate

A key, a header, a call

Always call www.monofile.ai — the apex redirects, and a redirect drops the Authorization header.

  1. Put your key in the environment

    Keys are shown once when created and stored hashed. Give each integration its own, scoped to what it needs.
    envsigned out
    export MONOFILE_API_KEY="mk_..."

    Sign in to create a key — it is filled in here for you, and every snippet below reads it.

  2. Check who the key is

    A 200 with your account means the key and the origin are right. A 401 means one of them is not.
    >_ terminalGET /api/users/me
    curl -s "https://www.monofile.ai/api/users/me" -H "Authorization: Bearer $MONOFILE_API_KEY"
  3. Call a tool

    The response is always the same envelope: { "content": [{ "type": "text", "text": "…" }] }, with the tool's result as JSON inside the text. A failed call is a 200 whose text is { "error": { "code", "message" } }.
    >_ terminalPOST /api/tools/bash
    curl -s -X POST "https://www.monofile.ai/api/tools/bash" \
      -H "Authorization: Bearer $MONOFILE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"command": "ls -la /"}'
errors.mdwhat a failure says
UNAUTHORIZED
HTTP 401. No key, or a revoked or expired one. Keys are mk_ followed by 32 characters.
INSUFFICIENT_SCOPE
The key lacks a scope the tool requires. Create a key with that scope; scopes cannot be added to an existing key.
OUT_OF_FOLDER_SCOPE
The key is confined to a folder and the path is outside it.
TOOL_NOT_FOUND
HTTP 404. No tool by that name — the registry below is the list.
TOOL_RENAMED
HTTP 404. The tool has a new name since skill v2; the message says which.
EXECUTION_ERROR
The tool ran and failed; the message carries the reason (missing file, invalid input…).

02—Tools

The registry

Pick a tool for its inputs, scopes and a curl you can paste.

tools.jsonloading

03—Scopes

What a key may do15 scopes

Scopes are fixed when a key is minted; a folder-scoped key also sees only that folder.

scopes.mdby group

Files

files:read
View and search files
files:write
Create and edit files
files:delete
Remove files and folders

Sharing

shares:read
View share status
shares:write
Share and unshare folders

Embeds

embeds:read
View embeds
embeds:write
Manage embeds

Community

community:read
Browse public folders
community:write
Fork folders to workspace

Search

search:semantic
AI-powered content search

Users

users:read
View user profiles and directory
users:write
Update your own profile

Social

social:read
View comments, followers, feed
social:write
Comment, vote, follow users

Docs

docs:admin
Manage public documentation (admin only)
presets.mdwhen creating a key
read only
files:read
read write
files:read, files:write
full access
Every scope except docs:admin — 14 of 15. What monofile login mints.

A tool's required scopes are listed in the registry above. A call without them answers INSUFFICIENT_SCOPE and names the missing one.

04—For agents

The files an agent reads

Click a path to copy its URL, then paste it into your agent's context.

agents.md7 files · served from www.monofile.ai
agent-prompt.mdthe one-line version
Paste Use Monofile in my project: www.monofile.ai/skill.md into Claude Code, Codex, Cursor or ChatGPT. The agent reads skill.md and takes it from there — registering its own account or asking you for a key.

05—Activity

Your API traffic

Direct REST calls made with your keys in the last 30 days.

activity.logsigned out

—

Every REST API request made with one of your keys lands here, per day. Sign in to see yours.

Monofile - The Agentic Filesystem