On this page

API

ReuseForge API

The ReuseForge HTTP API v1, the Python and JavaScript SDKs, the rf command line, the hosted MCP server and webhooks, with one contract behind all of them.

One JSON API sits behind the website, the SDKs, the rf command line and the hosted MCP server. A goal and a budget in US dollars go in; a plan of items to reuse, buy or build comes out; paid items sit in escrow until the buyer confirms. Everything on these pages is generated from the OpenAPI contract (api/openapi.yaml, version 1.1.0) or checked against the code, so the operation list, the scopes and the examples are the contract's own.

Test mode. Payments run on a simulated rail and no real money moves. GET /api/v1/ lists the rails and which are enabled. Operations that are in the contract but not switched on for a deployment answer 501 not_implemented; the availability table says which.

Start in five minutes

  • Quickstart: get a token, search, plan, install and buy, in curl, Python, JavaScript and the CLI.
  • Authentication and scopes: tokens, the 12 scopes, and the spend limit that keeps an agent from overspending.
  • Operation reference: all operations with parameters, bodies, errors and examples in four languages.
  • Hosted MCP server: claude mcp add --transport http reuseforge https://reuseforge.com/mcp.

Ways to call it

You areUseInstall
Writing PythonPython SDK: one method per operation, retries, pagination, safe installspip install ./sdk/python from a checkout
Writing JavaScript or TypeScriptJavaScript SDK: Node, Workers, Deno, Bun and browsers, typednpm install ./sdk/js from a checkout
In a terminal or CIrf command line: search, plan, install, publish, buynpm install -g ./cli from a checkout
Building an agentHosted MCP server: the same operations as toolsadd https://reuseforge.com/mcp to your client
Anything elseThe HTTP API with curl or any clientnothing: it is JSON over HTTPS

The SDKs and the CLI are not on PyPI or npm yet. Install them from a checkout of the repository as shown above; the guides say so wherever it matters.

What is enabled

The contract describes 72 operations. A deployment answers 501 not_implemented for those it does not provide yet. This table is read from the source of the hosted Worker and of the self-hosted Python node when these pages are built.

Operations available per deployment
Areareuseforge.comPython node
Meta5 of 55 of 5
Identity2 of 22 of 2
Tokens3 of 30 of 3
Items8 of 85 of 8
Reviews3 of 32 of 3
Versions6 of 64 of 6
Distribution2 of 20 of 2
Verification2 of 20 of 2
Planning6 of 66 of 6
Orders12 of 129 of 12
Projects0 of 1210 of 12
Webhooks9 of 90 of 9
Ledger0 of 22 of 2
All58 of 7245 of 72

The hosted payments group (orders, payouts, projects) is built but not switched on for reuseforge.com yet; the self-hosted node runs it today on simulated payments. See self-hosting.

Conventions

TopicRule
Base URLhttps://reuseforge.com/api/v1. Self-hosted: http://127.0.0.1:8420/api/v1.
FormatJSON only, snake_case keys, the same bytes in curl, the SDKs and the CLI. No case conversion anywhere.
MoneyInteger US cents in fields ending _cents, with currency: "USD". Rates are basis points in fields ending _bps. No decimal dollars on the wire.
Ids<prefix>_<random>: itm_ item, ver_ version, ord_ order, pln_ plan, tok_ token, whk_ webhook. Never parse beyond the prefix.
ItemsAddressed as owner/slug or by id. The Python code calls the same thing a block.
TimeRFC 3339 UTC strings (2026-11-03T10:00:00Z). Webhook signature timestamps are unix seconds.
Lists{data, next_cursor, has_more}. Never a bare array. See pagination.
Errorsapplication/problem+json with a stable code. See errors.
EvolutionAdditive only inside /v1. Ignore unknown fields and unknown enum values. See versioning.
Every responseX-Request-Id, ReuseForge-Version, RateLimit-*. Quote the request id when you ask for help.
CORSOpen (*, no credentials). Browsers can call it with a bearer token. Session cookies are honoured only for the site's own web app, never cross-site.

Scopes

A token carries scopes; an operation lists the scopes it needs and all of them are required. Public reads need none. The full explanation, including how a person grants a token and why orders:accept is different, is in authentication.

Token scopes
ScopeAllowsOperations
items:readRead your private and unlisted items, item statistics and your stars.none (widens public reads)
items:writeCreate, edit, retract, star and review items you may act for.8
items:publishPublish and yank versions and request verifications.3
orders:readRead your orders, payouts and earnings.4
orders:createCreate, cancel and dispute orders; deliver or refund items you sell. Cannot move money.5
orders:payFund escrow for an order or a project backing. Bounded by the token spend limit.2
orders:acceptConfirm satisfaction and release escrow. Irreversible. Never granted by default. Only a signed-in person can grant it.1
projects:readRead your portfolio.1
projects:writeCreate projects, deliver and vote on milestones, transfer units.9
webhooks:manageCreate, read, update and delete webhooks and read deliveries.9
tokens:manageList, create and revoke API tokens.3
adminPlatform operator actions (dispute resolution). Honoured only for admin accounts.1

Areas of the API

API areas
AreaOperationsCovers
Meta5Index, health, contract, event catalogue and rate limit status.
Identity2The authenticated principal and public profiles.
Tokens3Personal access tokens with scopes, expiry and spend limits.
Items8Search, publish and manage items.
Reviews3Reviews by verified buyers.
Versions6Immutable published versions, bundles and install descriptors.
Distribution2Archives and hosted marketplaces for tools that do not speak this API (unzip, Claude Code plugin marketplaces).
Verification2Test attestations that feed the risk and quality signals.
Planning6Goal to Pareto plan, build briefs, external discovery, MCP config.
Orders12Escrowed orders, payments, delivery, acceptance and disputes.
Projects12Crowdfunded builds with milestones and revenue units.
Webhooks9Signed event delivery to your servers.
Ledger2Signed event feed for syncing self-hosted nodes with the hosted platform.

Machine-readable

FileWhat it is
/docs/api/openapi.json and openapi.yamlThe OpenAPI 3.1 contract, with an example for every request and response. Also served live at GET /api/v1/openapi.json.
/llms.txtA short index for language models, following the llms.txt convention.
/llms-full.txtThese documents as one Markdown file: guides, every operation, the error catalogue, the CLI and the MCP tools.
/docs/api/search-index.jsonOperations, pages and sections as JSON.
/docs/api/schemas/reuseforge.schema.jsonJSON Schema of the publish manifest reuseforge.json.
https://reuseforge.com/.well-known/mcp/server-card.jsonMCP server card for the hosted server.

Every error response has a type that is a URL on this site, for example /docs/api/errors/insufficient_scope/.

Last updated: