Developer platform

Small API.
Stable contract.

Build local webhook workflows with the versioned API, a dependency-free CLI, reusable SDK examples, and an OpenAPI 3.1 contract. Creating a bin confirms acceptance of the Terms and Conditions.

API versioning

Management endpoints use /api/v1. Compatible fields may be added within v1, but existing fields and behavior will not be removed or changed incompatibly. A breaking contract change will use a new major path. Capture URLs remain /b/:binId/* so webhook destinations do not change when the management API evolves.

Install the CLI

curl -fsS https://freebin.org/freebin.mjs -o freebin.mjs
chmod +x freebin.mjs
FREEBIN_API_KEY=YOUR_API_KEY ./freebin.mjs bins

The CLI supports bins, create, send, requests, watch, export, replay, local-forward, assert, and delete-request. Watch and local-forward emit JSON lines and accept --include-existing. Local forwarding runs in the CLI, so it can reach localhost while still stripping authorization, cookies, credential-like, hop-by-hop, and source-address headers. Set FREEBIN_URL=http://127.0.0.1:8787 for local development.

./freebin.mjs assert BIN_ID --method POST --path '/webhooks/*' \
  --header x-event=invoice.created --body-json data.status=paid --timeout 30

Assertions combine method, path glob, repeated header, repeated body substring, and repeated JSON dot-path predicates with AND semantics. Exit code 0 indicates a match, 2 a timeout, and 1 a usage or operational error.

Connect an MCP client

{
  "mcpServers": {
    "freebin": {
      "url": "https://freebin.org/mcp"
    }
  }
}

The stateless Streamable HTTP server provides list_bins, list_requests, get_request, and replay_request. OAuth-capable clients discover Freebin automatically, use authorization code flow with S256 PKCE, and show an explicit consent screen for read and replay scopes. Account API keys remain a compatibility option through a custom bearer header. Both methods return owned bins only. Request bodies are bounded before entering model context, and replay uses the same destination allowlist, egress limits, retention, sensitive-header stripping, and mutation audit trail as the browser and API.

Create a bin

curl -X POST https://freebin.org/api/v1/bins \
  -H "authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Payments dev","termsAccepted":true}'

Send a request

curl -X POST https://freebin.org/b/YOUR_BIN_ID/events \
  -H "authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"status":"ok"}'

List captured requests

curl "https://freebin.org/api/v1/bins/YOUR_BIN_ID/interactions?limit=50" \
  -H "authorization: Bearer YOUR_API_KEY"

Inspector filtering

The browser inspector filters its loaded retained history by free text, HTTP method, capture time range, path, content type, header name and value, and dotted JSON body fields. Filter and paging state is encoded in the URL and restored by browser history, making a filtered inspector URL shareable with another authorized user. Named saved views are planned for a later phase.

Portable bin configuration

Export a versioned document containing the bin name, fallback response, forwarding configuration, and ordered conditional response rules. The document excludes captures, replay history, account ownership, Freebin API keys, public-share tokens, rule IDs and revisions, and internal enforcement metadata. User-authored response bodies, headers, destinations, and rule values may still be sensitive, so review a file before sharing it.

curl https://freebin.org/api/v1/bins/YOUR_BIN_ID/config \
  -H "authorization: Bearer YOUR_API_KEY" \
  -o freebin-config.json

curl -X PUT https://freebin.org/api/v1/bins/OTHER_BIN_ID/config \
  -H "authorization: Bearer YOUR_API_KEY" \
  -H "content-type: application/json" \
  --data-binary @freebin-config.json

Imports replace the destination bin’s portable fields and all rules atomically while preserving its captured requests and replay attempts. Local rule IDs and revisions are regenerated. The import must satisfy the destination account’s limits, and enabled forwarding must target an origin permitted by that deployment. Validate files against bin-config.v1.json.

Authentication

Send an account API key as Authorization: Bearer YOUR_API_KEY. Keys are user-scoped, shown only once, individually revocable, and limited to five active keys per account. Every capture method requires a key belonging to the destination bin’s owner.

Complete endpoint reference

All currently implemented API and capture endpoints are listed below. Public share URLs are read-only web pages rather than JSON API endpoints.

Stable management API

Management endpoints intended for integrations and the first-party browser. Replace path parameters with IDs returned by the API.

GET /api/v1/bins

List every bin owned by the API-key user, newest first. Returns names, IDs, creation times, and retained-request counts.

Bearer key
POST /api/v1/bins

Create a private bin with a bearer key or browser session. Without credentials, creates a public bin that cannot capture. Send termsAccepted: true; names default to Untitled bin.

Optional bearer key or session
GET /api/v1/bins/:binId

Read a bin’s name, response and forwarding configuration, creation time, and current public-share token.

Bearer, session, or token query
PATCH /api/v1/bins/:binId

Customize capture response fields and optional Phase 0 automatic forwarding to one allowlisted HTTPS base URL.

Bearer key or session
DELETE /api/v1/bins/:binId

Permanently delete the bin and all of its retained requests.

Bearer key or session
GET / PUT /api/v1/bins/:binId/config

Export or atomically replace the versioned portable bin configuration and ordered response rules. Captures and replay history are preserved.

Bearer key or session
GET /api/v1/bins/:binId/audit

List the newest permission-gated mutation events; up to 500 are retained per bin.

Bearer key or session
GET / PUT / DELETE /api/v1/bins/:binId/collaborators

List, invite or update, and remove registered-user collaborators. Invitation changes remain owner-only.

Session required
GET / POST / PUT /api/v1/bins/:binId/rules

List, create, or reorder conditional response rules. Enabled rules use first-match-wins order.

Bearer key or session
PATCH / DELETE /api/v1/bins/:binId/rules/:ruleId

Update or delete one conditional response rule.

Bearer key or session
POST /api/v1/bins/:binId/rules/test

Test a synthetic request against enabled rules without capturing it.

Bearer key or session
GET /api/v1/bins/:binId/interactions?limit=10&offset=0

List retained requests. limit accepts 1–100 or all and defaults to 10; responses include total and offset metadata.

Bearer, session, or token query
GET /api/v1/bins/:binId/stream?lastId=:requestId

Open a server-sent event stream. Emits request events and keepalives for about 25 seconds; reconnect to continue.

Bearer, session, or token query
GET /api/v1/bins/:binId/export

Download bin metadata and every currently retained request as JSON.

Bearer key or session
POST /api/v1/bins/:binId/share

Enable or disable a read-only public bin URL with {"public":true|false}. Enabling again rotates the URL.

Bearer key or session
DELETE /api/v1/bins/:binId/interactions/:requestId

Permanently delete one retained request.

Bearer key or session
GET /api/v1/bins/:binId/interactions/:requestId/export

Download one retained request as JSON.

Bearer key or session
POST /api/v1/bins/:binId/interactions/:requestId/share

Enable or disable a read-only public request URL with {"public":true|false}.

Bearer key or session
GET /api/v1/bins/:binId/interactions/:requestId/replay

List the newest 50 retained replay attempts, including effective request snapshots and results.

Bearer key or session
POST /api/v1/bins/:binId/interactions/:requestId/replay

Replay an optionally edited request, or forward the original through the bin’s configured destination with operation: "forward". Every attempt is recorded.

Bearer key or session
GET /api/v1/bins/:binId/interactions/:requestId/forwarding

List retained automatic-forwarding attempts for one captured request.

Bearer key or session

MCP OAuth 2.1

OAuth-capable MCP clients discover these endpoints automatically. Freebin requires authorization code flow with S256 PKCE and explicit account consent.

GET /.well-known/oauth-protected-resource/mcp

Describe the protected MCP resource, authorization server, and baseline scopes.

Public
GET /.well-known/oauth-authorization-server

Publish authorization, token, registration, revocation, scope, and PKCE metadata.

Public
GET / POST /oauth/authorize

Authenticate the account, display requested access, and approve or deny the OAuth grant.

Session required
POST /oauth/token

Exchange an authorization code, refresh an access token, or revoke a token according to advertised metadata.

OAuth client
POST /oauth/register

Register a compatible OAuth client dynamically. Client ID Metadata Documents are also supported.

Public

Request capture

Capture URLs are deliberately outside the management API version. They remain stable destinations for webhook senders.

GET /b/:binId/*

Capture a GET request and return the bin’s configured response.

Bearer key required
POST /b/:binId/*

Capture a POST request and return the bin’s configured response.

Bearer key required
PUT /b/:binId/*

Capture a PUT request and return the configured response.

Bearer key required
PATCH /b/:binId/*

Capture a PATCH request and return the configured response.

Bearer key required
DELETE /b/:binId/*

Capture a DELETE request and return the configured response.

Bearer key required
OPTIONS /b/:binId/*

Capture an OPTIONS request and return the configured response.

Bearer key required

Browser account and session API

These endpoints support the first-party web application. Session endpoints use the secure HttpOnly cookie set during registration or login.

GET /api/config

Return public browser configuration: signup availability plus the optional RUM beacon-script URL and public token.

Public
POST /api/auth/register

Create an account and session. Requires email, a 10–128 character password, termsAccepted: true, and enabled signups.

Public
POST /api/auth/login

Validate email and password and create a 30-day session cookie.

Public
POST /api/auth/logout

Delete the current server session and clear its cookie.

Session optional
GET /api/me

Return the signed-in account, byte usage and limit, and owned bins. Returns user: null when signed out.

Session
DELETE /api/me

Permanently delete the signed-in account and clear its session.

Session required
GET /api/account/token

List API-key metadata. Full key values are never returned after creation.

Session required
POST /api/account/token

Create a named user API key. The full token is returned once; accounts may have five active keys.

Session required
DELETE /api/account/token

Revoke the key whose ID is supplied as {"id":"…"}.

Session required

Documented service limits

LimitRegisteredCanonical demo
Capture rate20 requests/second per user1 request/second for the canonical demo
Request body1 MB20 KB for the canonical demo
Retention5 MB per account by default1 MB for the canonical demo
Bins5 per accountSubject to creation abuse controls
API keys5 active per accountNot applicable
List page1–100 requests or all; default 10
Custom response fields500 UTF-8 bytes per text field and serialized headers field
Conditional response rules5 enabled and 10 total per bin; 25 enabled and 50 total per accountSame per-bin limits
Replay and forward egress20 requests/second per account1 request/second
Bulk egress concurrency3 requests in flight; no cancellation

Retention is byte-based across captures and replay history. Old replay attempts are evicted before captured requests when the account reaches its allowance. There is no date-based cleanup. Rate-limited requests return 429; oversized requests return 413.

Automatic forwarding is best-effort: one destination per bin, a 10-second timeout, no redirects, and no retries. Each captured request has separate pending, delivered, or failed attempt history with destination, response code, error, latency, and timestamps; the request-level fields summarize the latest result. The original path and query are appended to the configured base URL. Credential-like headers are stripped by default and may be retained with a per-bin allowlist. Authorization is always removed because it contains the Freebin API key; hop-by-hop and source-address headers are also never forwarded.

Conditional responses evaluate up to five enabled rules in order and stop at the first match. Each rule supports up to five AND conditions over method, path, query, selected headers, and JSON or form body fields using equals, exists, contains, or glob. Rules cannot inspect authorization or cookie headers. Static responses may delay for up to five seconds.

Replay attempts preserve the original capture and store the effective edited request plus its result separately. Replay history shares the account retention budget; oldest replay attempts are evicted before captured requests. Replay uses a 10-second timeout, does not follow redirects, and strips authorization, cookies, credential-like, hop-by-hop, and source-address headers.

Error model

JSON API errors use {"error":"Human-readable message"}. Clients should branch on HTTP status codes and treat the message as diagnostic text, not a stable machine identifier.

console.log(`freebin.org v$d951872 time:$2026-09-10T03:50:02.630Z`);`);