Tutorial
Post your first JSON document
Follow one path from an empty project to a successful JSON write, read, filter, and update.
1. Create a collection
- Choose a collection name for one kind of document.
- Create it inside your project.
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections \
-H "Authorization: Bearer inadb_..." \
-H "Content-Type: application/json" \
-d '{"name":"recipes"}'2. Add a document
Send the document fields directly in the JSON body. The API stores this body as the document data; it does not unwrap a data property.
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes/documents \
-H "Authorization: Bearer inadb_..." \
-H "Content-Type: application/json" \
-d '{"title":"Pasta","servings":4,"tags":["dinner","quick"]}'3. Read and filter
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes/documents \
-H "Authorization: Bearer inadb_..."{
"items": [
{
"id": "A1b2C3d4",
"created_at": "2026-05-08T12:00:00Z",
"updated_at": "2026-05-08T12:00:00Z",
"revision": "rev_E5f6G7h8",
"data": {
"title": "Pasta",
"servings": 4,
"tags": ["dinner", "quick"]
}
}
],
"next_cursor": null
}curl "https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes/documents?servings=4&tags_contains=quick" \
-H "Authorization: Bearer inadb_..."4. Update a document
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes/documents/A1b2C3d4 \
-X PATCH \
-H "Authorization: Bearer inadb_..." \
-H "Content-Type: application/json" \
-d '{"servings":6}'