# Get a fact

> GET /v1/memory/{memoryId}

`GET https://api.zavu.dev/v1/memory/{memoryId}`

## Parameters

- `memoryId` (path, string, required): Memory (fact) ID.
- `scope` (query, string): Which scope to address: `contact:<contactId>`, `conversation:<conversationId>`, or omitted for the project scope. Note the asymmetry with `POST /v1/memory` and `POST /v1/memory/search`, which take the scope in the request BODY as `scope` plus `contactId`/`conversationId`. Every other Memory endpoint takes it here.

## Responses

### 200

The fact.

- `memory` (object, required): A stored fact as returned by a read. `score` appears only on search results.
  - `id` (string, required)
  - `text` (string): The remembered text.
  - `metadata` (object)
    - `{key}` (string)
  - `score` (number): Cosine similarity to the query, 0 to 1, higher being closer. Present on search results only — a list or a single read has no query to score against.
  - `createdAt` (string<date-time>, required)
  - `expiresAt` (string<date-time>)

### 400

Malformed memory id or `scope`.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

No such fact in that scope. A fact stored under `contact` is not found by a project-scoped read — pass the same `?scope=` it was written with.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/memory/memory_abc123" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.memory.retrieve("memory_abc123");

console.log(result);
```
