Skip to content
ForgePlug — Logo

API Reference

ForgePlug's tools run entirely in your browser, so there is no server API that processes tool data. The endpoints below are the only server endpoints that exist today — the contact form API and the Mock API Studio's live mock endpoints. Both are public, require no API key, and support CORS from any origin.

Contact Form API

POST /api/contact — used by the Contact page to receive messages.

Accepts a JSON body, validates it, stores the submission in a Firebase Realtime Database, and (when configured) sends an email notification. Returns JSON with a success flag and any validation errors.

Request — POST /api/contact
{
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "category": "feature",
  "message": "I'd love a CSV to JSON converter tool!"
}

Request fields

  • requiredemail — valid email address
  • requiredmessage — 10–5000 characters
  • name — optional, min 1 character
  • category — one of bug, feature, question, business, other

Responses

  • 200{ "success": true, "key": "..." }
  • 400Validation failed — { "success": false, "errors": [...] }
  • 500Storage or notification failure
Example — curl
curl -X POST https://www.forgeplug.com/api/contact \
  -H "Content-Type: application/json" \
  -d '{"email":"ada@example.com","message":"Hello from curl!"}'

Mock API — REST Endpoints

GET/POST/PUT/PATCH/DELETE /api/mock/{resource}[/{id}] — deterministic fake data for prototyping.

Serves the same data as the in-browser Mock API Studio, so you can build against realistic fake data with zero backend. Resources are generated deterministically from a seed, support full CRUD (mutations are in-memory per request scope), and are served with open CORS.

Example — GET /api/mock/users?limit=5&seed=forgeplug
curl "https://www.forgeplug.com/api/mock/users?limit=5&seed=forgeplug"

Available resources

/api/mock/users/api/mock/posts/api/mock/comments/api/mock/albums/api/mock/photos/api/mock/todos/api/mock/products/api/mock/orders/api/mock/customers/api/mock/invoices/api/mock/payments/api/mock/files/api/mock/categories/api/mock/reviews/api/mock/notifications/api/mock/messages/api/mock/companies/api/mock/employees/api/mock/blogs/api/mock/articles/api/mock/events

Query parameters

  • page, limit, offset, cursor — pagination
  • q — full-text search
  • sort — sort by field
  • fields — pick returned fields
  • seed, count — data generation
  • field=value plus _gt, _gte, _lt, _lte, _ne, _like, _in — per-field filters

Simulation helpers

  • __delay=ms — simulated latency (max 15000)
  • __error — force error responses
  • __auth=bearer|apikey|basic — require mock authentication
  • _envelope=true — wrap results in a meta envelope
  • _all=true — return all records
Example — write operations
# Create (echo-create, stateless)
curl -X POST https://www.forgeplug.com/api/mock/products \
  -H "Content-Type: application/json" \
  -d '{"name":"Wireless Headphones","price":89.99}'

# Update / delete a record
curl -X PATCH https://www.forgeplug.com/api/mock/products/3 -d '{"price":79.99}'
curl -X DELETE https://www.forgeplug.com/api/mock/products/3

Mock API — Realtime SSE Stream

GET /api/mock/realtime — a live event stream for prototyping realtime features.

Streams deterministic create, update, and delete events built from the same datasets as the REST endpoint — perfect for prototyping dashboards, chat feeds, or live tables with EventSource or fetch.

Example — stream product events every second
const source = new EventSource(
  "https://www.forgeplug.com/api/mock/realtime?resource=products&interval=1000&types=create,update&batch=1"
);
source.onmessage = (event) => console.log(JSON.parse(event.data));

Query parameters

  • resource — dataset slug (default users)
  • interval — delay between batches in ms (100–10000, default 1000)
  • types — comma-separated event pool, e.g. create,update
  • batch — events per batch (1–20)
  • seed — deterministic seed
  • random — jitter delays (50–150% of interval)

API — Frequently Asked Questions

Common questions about ForgePlug's endpoints.

Is there a public API for ForgePlug's tools?
Not yet. Every tool on ForgePlug runs entirely in your browser, so there is no server-side API that processes tool data. The endpoints documented on this page are the only server endpoints that exist today: the contact form API and the Mock API Studio's live mock endpoints.
What is the Mock API live endpoint?
The Mock API Studio ships with live endpoints under /api/mock that serve the same deterministic fake data as the in-browser studio. You can consume realistic REST resources (users, products, orders, and 18 more) and a realtime SSE event stream from your own code — with CORS fully open, so it works from localhost, mobile simulators, and desktop tools during development.
Do I need an API key to use these endpoints?
No. The endpoints are public and require no API key. The mock endpoints optionally simulate authentication (Bearer, API key, or Basic) via the __auth query parameter if you want to test authenticated flows.
Is there a rate limit?
There is no published rate limit for the mock endpoints. They are intended for development and prototyping, so please keep request volumes reasonable. The contact form API enforces server-side validation on email and message content.
Are these endpoints safe to use in production?
The Mock API endpoints return fake, deterministic data for development and prototyping — do not use them as a production data source. The contact form API is production-ready and powers the Contact page submissions.

Want to prototype with these endpoints?

Open the Mock API Studio for 21 datasets, GraphQL, OpenAPI, and 16-language code generation.