QuantaAPI
Dashboard
Reference

Calling a mock endpoint

Point any HTTP client at the fetch route with your collection key. No SDK, no session, no body envelope.

Any HTTP client
Public route

There is no sign-in and no session. The collection key is the only credential, and it is sent on every request.

URL shape

Base
https://quanta-api-backend.vercel.app/endpoints/fetch
Suffix
The endpoint path exactly as stored
Example
https://quanta-api-backend.vercel.app/endpoints/fetch/users
The path is matched exactlyThe suffix after /endpoints/fetch must equal the stored path, including casing. Query strings are not part of the match and dynamic segments are not supported.

Required header

Send x-collection-api-key: <collection key>. Without it the response is 403, and the same applies to a key that no longer exists.

Request body

Send the JSON payload directly. Do not wrap it in body or header fields — the server parses the raw body, and header requirements are checked against the real HTTP headers of the request.

Correct
{
  "name": "Ada",
  "role": "admin"
}
Incorrect — this is not unwrapped by the server
{
  "body": { "name": "Ada" },
  "header": {}
}

Body requirements only apply to POST, PUT, and PATCH. For other methods the body is ignored; header requirements are still enforced.

Examples

curl -X POST https://quanta-api-backend.vercel.app/endpoints/fetch/users \
  -H "Content-Type: application/json" \
  -H "x-collection-api-key: YOUR_COLLECTION_KEY" \
  -d '{"name":"Ada","role":"admin"}'

Response headers

NAMETYPEREQUIREDDESCRIPTION
X-Response-LatencystringAlways / conditionalLatency configured on the endpoint, in milliseconds.
X-Request-MethodstringAlways / conditionalHTTP method that matched the endpoint.
X-Validation-ErrorsstringAlways / conditionalJSON array of validation errors. Only present when validation fails.

X-Validation-Errors is only present when validation fails, so treat a missing header as success rather than as an empty value.

CORS

The fetch route allows every origin and the common HTTP methods, so you can call it directly from a browser. The response headers listed above are exposed to JavaScript.

Status codes

STATUSCODEDESCRIPTION
200—Valid request and no simulated error.
400—The payload failed validation. See X-Validation-Errors.
403—Missing or unknown collection key.
404—No endpoint in that collection matches the path and method.
500—Unexpected server error.
502 / 504 / 429—Injected from the error pool when simulation triggers.