OnlyAPI
Dashboard

Custom endpoints

Use the project folder.

Drag in a project folder. OnlyAPI reads the tree, names the routes, and gives your team a clean endpoint surface before the backend meeting is over. Made for tiny studios or indie devs looking to create a server for products.

Structure

Make the tree match the endpoint surface.

Upload the folder you already have. Folder names become URL segments, bracketed names become params, and method suffixes become verbs when you need a verb other than GET. An api folder is optional; when it exists, OnlyAPI uses it as the route anchor.

my-api/
  health.json
  products/
    index.json
    [id].json
  users/
    [id]/
      profile.patch.json

Naming

Name files like the endpoint you want.

Folder file Generated route
health.json GET /health
products/index.json GET /products
products/[id].json GET /products/:id
users/[id]/profile.patch.json PATCH /users/:id/profile
api/jobs/run.post.function.js POST /jobs/run

Example

Create custom API URLs from files.

product-server/
  products/
    index.json
    [id].json
  checkout/
    session.post.json
  accounts/
    {accountId}/usage.json

After upload, these routes are available at the project runtime base. If the project ID is api_abc123, call them like this:

curl "https://onlyapi.wispbyte.app/runtime/api_abc123/products"
curl "https://onlyapi.wispbyte.app/runtime/api_abc123/products/42"
curl -X POST "https://onlyapi.wispbyte.app/runtime/api_abc123/checkout/session"

Rules

How OnlyAPI reads the tree.

  1. The api folder is optional If your upload contains an api segment, OnlyAPI removes everything before it and uses that as the route root.
  2. Method suffixes are optional Files default to GET. Use .post, .put, .patch, .delete, .head, or .options only when you need a different verb.
  3. Index files map to the folder products/index.json becomes GET /products.
  4. Dynamic params use brackets Use [id] or {id} in folder or file names to generate :id route params.
  5. Function files run handlers Add .function.js, .function.mjs, or .function.cjs for a serverless handler instead of a static response file.