# API overview (/docs/api/overview)
The Docklee REST API gives you everything `Dock` and `Lynk` do, over plain HTTP. Use it from any language, or when you'd rather not add a package to your app.

<Callout type="info">
You need an API key to call the API. Create one in **API Keys** in the [Docklee dashboard](https://app.docklee.com).
</Callout>

## Quick start [#quick-start]

<Steps>
<Step>
### Write a memory [#write-a-memory]

Send events to [`POST /v1/dock/ingest`](/docs/api/ingest) with a `memory_space_id`.
</Step>

<Step>
### Recall it [#recall-it]

Ask a question with [`POST /v1/dum/search`](/docs/api/search) in the same memory space.
</Step>

<Step>
### Ask an engine [#ask-an-engine]

Get a cited answer from your knowledge with [`POST /v1/engine/query`](/docs/api/query).
</Step>
</Steps>

## Core operations [#core-operations]

<Cards>
  <Card title="Ingest events" href="/docs/api/ingest" description="Write knowledge and memory in one batch." />
  <Card title="Search memories" href="/docs/api/search" description="Recall memories from a memory space." />
  <Card title="Query an engine" href="/docs/api/query" description="Get an answer with citations." />
  <Card title="Retrieve chunks" href="/docs/api/retrieve" description="Get the context for your own model." />
</Cards>

## API categories [#api-categories]

<Cards>
  <Card title="Dock" href="/docs/api/ingest" description="The one endpoint every write goes through." />
  <Card title="Memory" href="/docs/api/memory-write" description="Write single memories and search one or many memory spaces." />
  <Card title="Knowledge" href="/docs/api/query" description="Answers, streamed answers, and ranked chunks from an engine." />
  <Card title="Context" href="/docs/api/context-assemble" description="An engine answer and memory context in one call." />
</Cards>

## Authentication [#authentication]

Every request needs your API key as a bearer token:

```bash
curl https://api.docklee.com/v1/dum/search \
  -H "Authorization: Bearer $DOCKLEE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"memory_space_id": "your-memory-space-id", "query": "How does Maya like to be contacted?"}'
```

| Endpoint group | Key capability | Key runtime |
| --- | --- | --- |
| Dock | `write` or `both` | Knowledge Engines for a `container`, DUM for a `memory_space_id` |
| Memory writes | `write` or `both` | DUM |
| Memory searches | `read` or `both` | DUM |
| Knowledge | `read` or `both` | Knowledge Engines |
| Context | `read` or `both`, and `write` to save the turn | Knowledge Engines, and DUM with a `memory_space_id` |

A request outside the key's capability, runtimes, or scope fails with `403`. Every request runs inside the workspace that owns the key, so IDs from another workspace can never be read or written. See [API keys](/docs/docklee/api-keys).

## Next steps [#next-steps]

Start with the endpoint every write goes through, then learn how errors and limits work.

<Cards>
  <Card title="Ingest events" href="/docs/api/ingest" description="Batch up to 100 events per request." />
  <Card title="Errors" href="/docs/api/errors" description="Status codes and error bodies." />
  <Card title="Rate limits" href="/docs/api/rate-limits" description="Limits per key, and Retry-After." />
</Cards>
