> ## Documentation Index
> Fetch the complete documentation index at: https://docs.conare.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Namespaces

> A namespace is a named set of documents.

Every document lives in one namespace, and every query searches one namespace. Use them to keep
data apart: `docs`, `support-tickets`, or one per user of your app, like `user-42`.

* A namespace is created by its first write. There is no create call.
* Names are 1-64 characters of `a-z`, `0-9`, `_` and `-`, starting with a letter or digit.
* Namespaces belong to your organization. Every API key of the organization can use all of them.

<CodeGroup>
  ```ts TypeScript theme={null}
  const docs = conare.namespace("docs");  // a handle; nothing is sent yet

  await conare.namespaces();              // [{ name: "docs", documents: 120 }]
  await docs.drop();                      // delete the namespace and its documents
  ```

  ```bash curl theme={null}
  curl https://api.conare.ai/namespaces -H "Authorization: Bearer $CONARE_API_KEY"

  curl -X DELETE https://api.conare.ai/namespaces/docs -H "Authorization: Bearer $CONARE_API_KEY"
  ```
</CodeGroup>

## One namespace per user

If your app serves many users, give each one a namespace and query only theirs. Their data never
mixes, and you can connect each user's own apps into their namespace with
[sources](/sources).

```ts theme={null}
const user = conare.namespace(`user-${userId}`);
await user.add({ text: "Prefers email over phone." });
const context = await user.query("how should we contact them?");
```
