# Memory Rules SDK Methods

> The soat.memoryRules methods of the SOAT TypeScript SDK for the Memory Rules module, each linked to its REST operation.

# Memory Rules

SDK methods for the Memory Rules module, accessed via `soat.memoryRules`. See the [Memory Rules module docs](/docs/modules/memories) for permissions and data model, and each method's REST page for the full request/response schema.

### `soat.memoryRules.listMemoryRules()`

List memory rules

- Method: `GET`
- Path: `/api/v1/memory-rules`

```ts
await soat.memoryRules.listMemoryRules({
  query: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/memory-rules/list-memory-rules)

### `soat.memoryRules.createMemoryRule()`

Create a memory rule

- Method: `POST`
- Path: `/api/v1/memory-rules`

```ts
await soat.memoryRules.createMemoryRule({
  body: { memory_store_id, on, /* + optional */ },
});
```

→ [Request & response schema](/docs/api/memory-rules/create-memory-rule)

### `soat.memoryRules.getMemoryRule()`

Get a memory rule

- Method: `GET`
- Path: `/api/v1/memory-rules/{memory_rule_id}`

```ts
await soat.memoryRules.getMemoryRule({
  path: { memory_rule_id },
});
```

→ [Request & response schema](/docs/api/memory-rules/get-memory-rule)

### `soat.memoryRules.updateMemoryRule()`

Update a memory rule

- Method: `PATCH`
- Path: `/api/v1/memory-rules/{memory_rule_id}`

```ts
await soat.memoryRules.updateMemoryRule({
  path: { memory_rule_id },
  body: { /* + optional */ },
});
```

→ [Request & response schema](/docs/api/memory-rules/update-memory-rule)

### `soat.memoryRules.deleteMemoryRule()`

Delete a memory rule

- Method: `DELETE`
- Path: `/api/v1/memory-rules/{memory_rule_id}`

```ts
await soat.memoryRules.deleteMemoryRule({
  path: { memory_rule_id },
});
```

→ [Request & response schema](/docs/api/memory-rules/delete-memory-rule)
