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
/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.
{
"name": "Ada",
"role": "admin"
}{
"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
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| X-Response-Latency | string | Always / conditional | Latency configured on the endpoint, in milliseconds. |
| X-Request-Method | string | Always / conditional | HTTP method that matched the endpoint. |
| X-Validation-Errors | string | Always / conditional | JSON 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
| STATUS | CODE | DESCRIPTION |
|---|---|---|
| 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. |