Skip to main content
Every endpoint returns a JSON object. The top-level status field indicates whether the request succeeded or failed.

Success responses

GET — list

Returned when a GET request has no paramKey (or the query returns multiple documents).
{
  "status": "success",
  "data": [
    { "id": "doc1", "name": "Jane Doe", "age": 28, "email": "jane@example.com" }
  ]
}
When using a URL param combined with a query object, the response also includes a message field:
{
  "status": "success",
  "data": [ { "id": "doc1", "name": "Jane Doe", "age": 28, "email": "jane@example.com" } ],
  "message": "Found 1 documents"
}
status
string
required
Always "success" for successful responses.
data
array
required
Array of matching documents. Each document includes its Firestore document ID as id alongside all stored fields.
message
string
Present only on param+query GET responses. Contains a human-readable count of matched documents.

GET — single document

Returned when a GET request includes a paramKey and the document is found.
{
  "status": "success",
  "data": { "id": "doc1", "name": "Jane Doe", "age": 28, "email": "jane@example.com" }
}
data
object
required
The matched document, including its Firestore document ID as id.

POST — create

{ "status": "success", "data": { "id": "newlyCreatedDocId" } }
data
object
required

PUT / PATCH / DELETE

{ "status": "success", "message": "Document with id doc1 was updated" }
message
string
A human-readable confirmation of the operation performed.

Error responses

Validation error — missing fields

Returned when required fields are absent from the request body.
{ "status": "ERROR", "message": "Missed keys: email" }

Validation error — extra fields

Returned when the request body includes fields not defined in the collection schema.
{ "status": "ERROR", "message": "Don't use these keys: role: they are not in the schema" }

Not found — GET by param

Returned when a single-document GET finds no matching document.
{ "status": "error", "message": "No document with id xyz found in collection users" }

Firestore error

Returned when Firestore itself returns an error.
{ "status": "error", "message": "Firestore error message here" }
The error status value is not consistent across error types. Validation errors use uppercase "ERROR". Runtime and Firestore errors use lowercase "error". Check for both values when handling errors in your client code.
ValueWhen used
"success"The request completed successfully.
"error"A runtime error occurred, such as a missing document or a Firestore error.
"ERROR"A validation error occurred, such as missing or disallowed fields in the request body.