GET /api/data/:collectionName/:id
Fetches one document by its _id. Returns 404 if no document with that ID exists in the collection.
Required Header
x-api-key: your pk_live_… or sk_live_… key.
Path Parameters
The name of the collection (e.g.,
posts, products).The MongoDB ObjectId string of the document to retrieve (e.g.,
64fd1234abcd5678ef901234).Response Fields
true when the document was found.The full document object, including
_id and all stored fields.Human-readable status message.
Code Examples
Success Response
Errors
| Status | Cause |
|---|---|
401 Unauthorized | Missing or invalid API key, or missing Bearer token on a private collection |
404 Not Found | No document with that ID exists in the collection |
