How-to

Manage collections

Create, inspect, and delete collections inside a project.

Create a collection

Create one collection for each kind of document you want to store.

curl
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections \
  -H "Authorization: Bearer inadb_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"recipes"}'

List collections

List the collections in a project. Like other list endpoints, the response is an object with items and next_cursor, not a bare array.

curl
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections \
  -H "Authorization: Bearer inadb_..."
response
{
  "items": [
    {
      "name": "recipes",
      "documentCount": 4,
      "storageBytes": 1024,
      "updatedAt": "2026-05-08T12:00:00Z"
    }
  ],
  "next_cursor": null
}

Read a collection

Read one collection summary, including document count and storage use.

curl
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes \
  -H "Authorization: Bearer inadb_..."

Delete a collection

Delete a collection only when you no longer need its documents.

curl
curl https://ineedadatabase.com/api/v1/projects/proj_123/collections/recipes \
  -X DELETE \
  -H "Authorization: Bearer inadb_..."